X-Git-Url: https://git-public.kairo.at/?p=php-utility-classes.git;a=blobdiff_plain;f=include%2Fclasses%2Fuseragent.php-class;h=dffa0c8fe7633fcbb08b4d531b75384305f5d90d;hp=98be8ddd8d2f9d4d7cc3a66c2a70689fd05f2b77;hb=52e23932d7b7146ce5cd84d611ad83c4b9441969;hpb=0b7a8261eb31c7ef52bf2360cc58281075b80b0b diff --git a/include/classes/useragent.php-class b/include/classes/useragent.php-class index 98be8dd..dffa0c8 100755 --- a/include/classes/useragent.php-class +++ b/include/classes/useragent.php-class @@ -1177,11 +1177,11 @@ class userAgent { $this->uadata['eng_version'] = $regs[3]; $this->mobile = ($regs[2] == 'Mobile'); } - elseif (preg_match('|Mozilla/5.0 \(Mobile; [^;]+; rv:([^\);]+)\)|', $this->uastring, $regs)) { + elseif (preg_match('#Mozilla/5.0 \((Mobile|Tablet); [^;]+; rv:([^\);]+)\)#', $this->uastring, $regs)) { $this->uadata['os'] = 'Firefox OS'; $this->uadata['lang'] = null; - $this->uadata['eng_version'] = $regs[1]; - $this->mobile = true; + $this->uadata['eng_version'] = $regs[2]; + $this->mobile = ($regs[1] == 'Mobile'); } elseif (preg_match('|Mozilla/5.0 \(([^;]+); ([^;]+); rv:([^\);]+)\)|', $this->uastring, $regs)) { if ((strpos($regs[2], 'Linux') !== false) && ($regs[1] != 'X11')) { @@ -1198,11 +1198,11 @@ class userAgent { $this->uadata['lang'] = null; $this->uadata['eng_version'] = null; } - elseif (preg_match('|Mozilla/5.0 \(Mobile; rv:([^\);]+)\)|', $this->uastring, $regs)) { + elseif (preg_match('#Mozilla/5.0 \((Mobile|Tablet); rv:([^\);]+)\)#', $this->uastring, $regs)) { $this->uadata['os'] = 'Firefox OS'; $this->uadata['lang'] = null; - $this->uadata['eng_version'] = $regs[1]; - $this->mobile = true; + $this->uadata['eng_version'] = $regs[2]; + $this->mobile = ($regs[1] == 'Mobile'); } elseif (preg_match('|Mozilla/5.0 \(([^;]+); rv:([^\);]+)\)|', $this->uastring, $regs)) { $this->uadata['os'] = $regs[1];