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=5a4b3583effa73f103498062626fc04a0a0323d8;hb=52e23932d7b7146ce5cd84d611ad83c4b9441969;hpb=63119c1631074d0207a985d84078ec83a753a9c8 diff --git a/include/classes/useragent.php-class b/include/classes/useragent.php-class index 5a4b358..dffa0c8 100755 --- a/include/classes/useragent.php-class +++ b/include/classes/useragent.php-class @@ -1177,6 +1177,12 @@ class userAgent { $this->uadata['eng_version'] = $regs[3]; $this->mobile = ($regs[2] == 'Mobile'); } + 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[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')) { $this->uadata['os'] = $regs[1].' ('.$regs[2].')'; @@ -1192,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];