From: robert Date: Mon, 11 Jul 2005 00:10:34 +0000 (+0000) Subject: better detection for old Mxx Mozilla versions X-Git-Url: https://git-public.kairo.at/?p=php-utility-classes.git;a=commitdiff_plain;h=09cd2756641d8b8e3ce6f4dc79a23ecd2affb214 better detection for old Mxx Mozilla versions --- diff --git a/include/classes/useragent.php-class b/include/classes/useragent.php-class index d060a62..f535333 100755 --- a/include/classes/useragent.php-class +++ b/include/classes/useragent.php-class @@ -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];