From: Robert Kaiser Date: Tue, 11 Aug 2015 21:35:33 +0000 (-0700) Subject: add Panasonic FxOS TV detection X-Git-Url: https://git-public.kairo.at/?p=php-utility-classes.git;a=commitdiff_plain;h=1486b1d9436a872c9658b78d534b7c1c8ce71f63;hp=7ce4eeadca043a77ab0735de1ec296c4be073cce add Panasonic FxOS TV detection --- diff --git a/include/classes/useragent.php-class b/include/classes/useragent.php-class index 380745f..9026179 100755 --- a/include/classes/useragent.php-class +++ b/include/classes/useragent.php-class @@ -1204,6 +1204,11 @@ class userAgent { $this->uadata['eng_version'] = $regs[2]; $this->mobile = ($regs[1] == 'Mobile'); } + elseif (preg_match('#Mozilla/5.0 \(([^;]+); Viera; rv:([^\);]+)\)#', $this->uastring, $regs)) { + $this->uadata['os'] = 'Firefox OS (TV, '.$regs[1].')'; + $this->uadata['lang'] = null; + $this->uadata['eng_version'] = $regs[2]; + } 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].')'; diff --git a/testbed/ua_list_raw.txt b/testbed/ua_list_raw.txt index 00b1c6a..091c103 100755 --- a/testbed/ua_list_raw.txt +++ b/testbed/ua_list_raw.txt @@ -58,7 +58,7 @@ Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20.0 Firefox/20.0 Mozilla/5.0 (Android; Mobile; rv:12.0) Gecko/12.0 Firefox/12.0 Mozilla/5.0 (Android; Tablet; rv:14.0a1) Gecko/14 Firefox/14.0a1 Mozilla/5.0 (Android; Tablet; rv:28.0) Gecko/28.0 Firefox/28.0 -Mozilla/5.0 (Android 4.4; Mobile; rv:36.0) Gecko/36.0 Firefox/36.0' +Mozilla/5.0 (Android 4.4; Mobile; rv:36.0) Gecko/36.0 Firefox/36.0 Mozilla/5.0 (Android; rv:20.0) Gecko/20.0 Firefox/20.0 Mozilla/5.0 (Android; Linux armv7l; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Fennec/2.0.1 Mozilla/5.0 (Android; Linux armv7l; rv:2.0b6pre) Gecko/20100907 Firefox/4.0b6pre Fennec/2.0b1pre @@ -83,6 +83,7 @@ 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 (Tablet; rv:26.0) Gecko/26.0 Firefox/26.0 Mozilla/5.0 (Tablet; Saga G1; rv:26.0) Gecko/26.0 Firefox/26.0 +Mozilla/5.0 (FreeBSD; Viera; rv:34.0) Gecko/20100101 Firefox/34.0 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