From: Robert Kaiser Date: Thu, 5 Nov 2009 14:00:29 +0000 (+0100) Subject: correctly detect N900's microB X-Git-Url: https://git-public.kairo.at/?p=php-utility-classes.git;a=commitdiff_plain;h=fe42635cb2d19ca21d3229f28b15a89c9ad30836 correctly detect N900's microB --- diff --git a/include/classes/useragent.php-class b/include/classes/useragent.php-class index f87badb..0b2279b 100755 --- a/include/classes/useragent.php-class +++ b/include/classes/useragent.php-class @@ -297,6 +297,11 @@ class userAgent { $this->version = $regs[1]; $this->bot = false; } + elseif (preg_match('|Maemo Browser ([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) { + $this->brand = 'microB'; + $this->version = $regs[1]; + $this->bot = false; + } elseif (preg_match('|Opera\/([^\(]+) \(.*; Opera Mini; |', $this->uastring, $regs)) { $this->brand = 'Opera Mini'; $this->version = $regs[1]; diff --git a/testbed/ua_list_raw.txt b/testbed/ua_list_raw.txt index 443fbd3..342b4c1 100755 --- a/testbed/ua_list_raw.txt +++ b/testbed/ua_list_raw.txt @@ -60,6 +60,7 @@ Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20061031 Firefox/1.5.0 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061024 Iceweasel/2.0 (Debian-2.0+dfsg-1) Mozilla/5.0 (X11; U; Linux armv6l; en-GB; rv:1.9a6pre) Gecko/20071128 Firefox/3.0a1 Tablet browser 0.2.2 RX-34+RX-44_2008SE_2.2007.48-9 Mozilla/5.0 (X11; U; Linux armv6l; en-US; rv:1.9a6pre) Gecko/20070926 Firefox/3.0a1 Tablet browser 0.1.22 RX-34+RX-44_OSSO1.1_0.2007.39-13 +Mozilla/5.0 (X11; U; Linux armv7l; gb-GB; rv:1.9.2a1pre) Gecko/20090814 Firefox/3.5 Maemo Browser 1.3.11.1 RX-51 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031019 Epiphany/1.0.6 Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.4 Epiphany/1.6.3 Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.8.0.4) Gecko/20060608 Ubuntu/dapper-security Epiphany/2.14