better detection for old Mxx Mozilla versions
authorrobert <robert>
Mon, 11 Jul 2005 00:10:34 +0000 (00:10 +0000)
committerrobert <robert>
Mon, 11 Jul 2005 00:10:34 +0000 (00:10 +0000)
include/classes/useragent.php-class

index d060a6246a0a5aadd29d0406f9a36bf1b2a64725..f5353338126647c0d30b56d19125f89897cf7957 100755 (executable)
@@ -217,6 +217,11 @@ class userAgent {
       $this->version = $regs[1];
       $this->bot = false;
     }
+    elseif (preg_match('|m([0-9]+)\)|', $this->uastring, $regs) && strstr($this->uastring, "Mozilla/") && strstr($this->uastring, "Gecko/")) {
+      $this->brand = 'Mozilla';
+      $this->version = 'M'.$regs[1];
+      $this->bot = false;
+    }
     elseif (preg_match('|Opera[ /]([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
       $this->brand = 'Opera';
       $this->version = $regs[1];
@@ -539,6 +544,11 @@ class userAgent {
           $this->uadata['lang'] = $regs[3];
           $this->uadata['eng_version'] = 'M'.$regs[4];
         }
+        elseif (preg_match('|Mozilla/5.0 \(([^;]+); [^;]+; ([^;]+); m([^\);]+)\)|', $this->uastring, $regs)) {
+          $this->uadata['os'] = $regs[1];
+          $this->uadata['lang'] = $regs[2];
+          $this->uadata['eng_version'] = 'M'.$regs[3];
+        }
         elseif (preg_match('|Mozilla/5.0 \(([^;]+); [^;]+; ([^;]+); ([^\);]+)\)|', $this->uastring, $regs)) {
           $this->uadata['os'] = $regs[2];
           $this->uadata['lang'] = $regs[3];