Merge branch 'master' of linz:/srv/git/git-kairo
authorRobert Kaiser <kairo@kairo.at>
Tue, 23 Jun 2015 20:32:53 +0000 (22:32 +0200)
committerRobert Kaiser <kairo@kairo.at>
Tue, 23 Jun 2015 20:32:53 +0000 (22:32 +0200)
include/classes/useragent.php-class
testbed/ua_list_raw.txt

index 22dc491be76ab42239daa637314fdd145878796a..380745f32c9997bee29862aa9fed3f66d3ac2e43 100755 (executable)
@@ -363,6 +363,7 @@ class userAgent {
       $this->brand = 'Edge';
       $this->version = $regs[1];
       $this->bot = false;
+      $this->mobile = preg_match('| Mobile |', $this->uastring);
     }
     elseif (preg_match('|Chromium/([0-9a-zA-Z\.+]+)|', $this->uastring, $regs)) {
       $this->brand = 'Chromium';
@@ -1244,6 +1245,9 @@ class userAgent {
           if (preg_match('#Mozilla/5.0 \(([^;]+); (WOW64|Win64); ([^\);]+)\)#', $this->uastring, $regs)) {
             $this->uadata['os'] = $regs[1].' ('.$regs[2].')';
           }
+          elseif (preg_match('#Mozilla/5.0 \(([^;]+Phone[^;]+); [^\)]+\)#i', $this->uastring, $regs)) {
+            $this->uadata['os'] = $regs[1];
+          }
         }
         elseif ($this->hasEngine('trident') || $this->hasEngine('tasman')) {
           if (preg_match('/Mozilla\/[^\(]+ \((IE [^;]+[^\)]*; )?((?:Mac|Win)[^;]+); ?(Win64|WOW64); ?Trident\/([^;\)]+);/i', $this->uastring, $regs)) {
index 16b906e45830f083d44249e58c716c3fc9d88d82..00b1c6aa08ab56780433e0281d69396533bd1d5e 100755 (executable)
@@ -118,6 +118,7 @@ Mozilla/5.0 (X11; U; Linux i686) Gecko/20040319 Galeon/1.3.7
 Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20021204
 Galeon/1.3.7 (IE4 compatible; I; Windows XP) Galeon/1.3.7 Debian/1.3.7.20030803-1
 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0
+Mozilla/5.0 (Windows Phone 10; Android 4.2.1; Microsoft; NOKIA) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Mobile Safari/537.36 Edge/12.0
 Microsoft Internet Explorer/4.0b1 (Windows 95)
 Mozilla/1.22 (compatible; MSIE 1.5; Windows NT)
 Mozilla/2.0 (compatible; MSIE 3.01; Windows 95)