support Firefox OS with device specifier
authorRobert Kaiser <kairo@kairo.at>
Fri, 13 Sep 2013 01:53:35 +0000 (03:53 +0200)
committerRobert Kaiser <kairo@kairo.at>
Fri, 13 Sep 2013 01:53:35 +0000 (03:53 +0200)
include/classes/useragent.php-class
testbed/ua_list_raw.txt

index 5a4b3583effa73f103498062626fc04a0a0323d8..98be8ddd8d2f9d4d7cc3a66c2a70689fd05f2b77 100755 (executable)
@@ -1177,6 +1177,12 @@ class userAgent {
             $this->uadata['eng_version'] = $regs[3];
             $this->mobile = ($regs[2] == 'Mobile');
           }
+          elseif (preg_match('|Mozilla/5.0 \(Mobile; [^;]+; rv:([^\);]+)\)|', $this->uastring, $regs)) {
+            $this->uadata['os'] = 'Firefox OS';
+            $this->uadata['lang'] = null;
+            $this->uadata['eng_version'] = $regs[1];
+            $this->mobile = true;
+          }
           elseif (preg_match('|Mozilla/5.0 \(([^;]+); ([^;]+); rv:([^\);]+)\)|', $this->uastring, $regs)) {
             if ((strpos($regs[2], 'Linux') !== false) && ($regs[1] != 'X11')) {
               $this->uadata['os'] = $regs[1].' ('.$regs[2].')';
index c11001dca2d1c1f2bf8001da4fac09c292b3de22..5116e0068b7146ff16ed18efc2257579424894ab 100755 (executable)
@@ -76,6 +76,7 @@ Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2a2pre) Gecko/2009
 Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3pre) Gecko/20100403 Lorentz/3.6.3plugin2pre (.NET CLR 4.0.20506)
 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a9pre) Gecko/2007110108 prism/0.8
 Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0
+Mozilla/5.0 (Mobile; LG-D300; rv:18.1) Gecko/18.1 Firefox/18.1
 Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.1.4pre) Gecko/20090928 Lightning/1.0pre Shredder/3.0pre
 Mozilla/5.0 (Windows; U; Windows NT 6.1; WOW64; en-US; rv:1.9.3a5pre) Gecko/20100514 Lanikai/3.1b1
 Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.5.0