Changeset 6018
- Timestamp:
- 10/11/2017 03:54:53 PM (7 years ago)
- Location:
- sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/parse.php
r6017 r6018 51 51 // Find tokens of interest in user-agent string. 52 52 preg_match_all( 53 '%(?P<name>Opera Mini|Opera|OPR|Edge|UCBrowser|UCWEB|QQBrowser|SymbianOS|Symbian|S40OviBrowser|Trident|Silk|Konqueror|PaleMoon| Camino|Kindle|Firefox|SamsungBrowser|(?:Mobile )?Safari|NokiaBrowser|MSIE|RockMelt|AppleWebKit|Chrome|IEMobile|Version)(?:[/ ])(?P<version>[0-9.]+)%im',53 '%(?P<name>Opera Mini|Opera|OPR|Edge|UCBrowser|UCWEB|QQBrowser|SymbianOS|Symbian|S40OviBrowser|Trident|Silk|Konqueror|PaleMoon|SeaMonkey|Camino|Kindle|Firefox|SamsungBrowser|(?:Mobile )?Safari|NokiaBrowser|MSIE|RockMelt|AppleWebKit|Chrome|IEMobile|Version)(?:[/ ])(?P<version>[0-9.]+)%im', 54 54 $user_agent, 55 55 $result, … … 179 179 elseif ( false !== ( $key = array_search( 'PaleMoon', $result['name'] ) ) ) { 180 180 $data['name'] = 'Pale Moon'; 181 $data['version'] = $result['version'][ $key ]; 182 } 183 // SeaMonkey 184 elseif ( false !== ( $key = array_search( 'SeaMonkey', $result['name'] ) ) ) { 185 $data['name'] = 'SeaMonkey'; 181 186 $data['version'] = $result['version'][ $key ]; 182 187 } -
sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/tests/phpunit/tests/browse-happy.php
r6017 r6018 624 624 ], 625 625 626 // SeaMonkey 627 628 [ 629 'Mozilla/5.0 (X11; FreeBSD i386; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40', 630 'FreeBSD SeaMonkey 2.40', 631 ], 632 [ 633 'Mozilla/5.0 (X11; Linux i686; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46', 634 'Linux SeaMonkey 2.46', 635 ], 636 [ 637 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40', 638 'Macintosh SeaMonkey 2.40', 639 ], 640 [ 641 'Mozilla/5.0 (X11; OpenBSD i386; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1', 642 'OpenBSD SeaMonkey 2.33.1', 643 ], 644 [ 645 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40', 646 'Windows SeaMonkey 2.40', 647 ], 648 626 649 // UC Browser 627 650
Note: See TracChangeset
for help on using the changeset viewer.