From: Robert Kaiser Date: Tue, 9 Sep 2008 17:06:39 +0000 (+0200) Subject: Merge branch 'master' of inode:/srv/git/git-kairo X-Git-Url: https://git-public.kairo.at/?p=php-utility-classes.git;a=commitdiff_plain;h=12f2803e72a419b2ad8032f6e5916ed968a909f5;hp=f08124ad75b93b6f9c59c6bd68cb7b114c0557fa Merge branch 'master' of inode:/srv/git/git-kairo --- diff --git a/include/classes/useragent.php-class b/include/classes/useragent.php-class index 49184a9..be512f4 100755 --- a/include/classes/useragent.php-class +++ b/include/classes/useragent.php-class @@ -277,6 +277,11 @@ class userAgent { $this->version = $regs[1]; $this->bot = false; } + elseif (preg_match('|Chrome/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) { + $this->brand = 'Chrome'; + $this->version = $regs[1]; + $this->bot = false; + } elseif (preg_match('|Safari/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) { $this->brand = 'Safari'; if (preg_match('|Version/([0-9a-zA-Z\.+]+)|', $this->uastring, $vregs)) { @@ -767,7 +772,7 @@ class userAgent { } } elseif ((strpos($this->brand, 'Konqueror') !== false) || (strpos($this->brand, 'Safari') !== false) || - (strpos($this->brand, 'Shiira') !== false) || + (strpos($this->brand, 'Shiira') !== false) || (strpos($this->brand, 'Chrome') !== false) || (strpos($this->brand, 'AppleWebKit') !== false) || (strpos($this->brand, 'OmniWeb') !== false)) { $this->uadata['engine'] = 'khtml'; } diff --git a/testbed/ua_list_raw.txt b/testbed/ua_list_raw.txt index af4c66a..e698c99 100755 --- a/testbed/ua_list_raw.txt +++ b/testbed/ua_list_raw.txt @@ -105,6 +105,7 @@ Mozilla/4.5 (compatible; OmniWeb/4.1.1-v423; Mac_PowerPC) Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v540 Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.51 Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/418 (KHTML, like Gecko) Shiira/1.2.2 Safari/125 +Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13 Mozilla/5.0 (SymbianOS/9.1; U; en-us) AppleWebKit/413 (KHTML, like Gecko) Safari/413 Opera/5.12 (Windows 2000; U) [de] Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 6.05 [ja]