Changeset 6020
- Timestamp:
- 10/11/2017 05:06:46 PM (8 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
r6019 r6020 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| SeaMonkey|Vivaldi|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|Puffin|SeaMonkey|Vivaldi|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, … … 180 180 $data['name'] = 'Pale Moon'; 181 181 $data['version'] = $result['version'][ $key ]; 182 } 183 // Puffin 184 elseif ( false !== ( $key = array_search( 'Puffin', $result['name'] ) ) ) { 185 $data['name'] = 'Puffin'; 186 $data['version'] = $result['version'][ $key ]; 187 $version = ''; 188 // If not an already-identified mobile platform, set it as such. 189 if ( ! $data['mobile'] ) { 190 $data['mobile'] = true; 191 $data['platform'] = ''; 192 } 182 193 } 183 194 // SeaMonkey -
sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/tests/phpunit/tests/browse-happy.php
r6019 r6020 523 523 ], 524 524 525 // Puffin 526 527 [ 528 'Mozilla/5.0 (Linux; Android 4.4.2; BLOOM Build/KOT49H; it-it) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Mobile Safari/537.36 Puffin/6.1.3.1599AP', 529 'Android Puffin 6.1.3.1599', 530 ], 531 [ 532 'Mozilla/5.0 (iPad; CPU OS 9_3_5 like Mac OS X; en-CA) AppleWebKit/537.36 (KHTML, like Gecko) Version/9.3.5 Mobile/13G36 Safari/537.36 Puffin/5.2.0IT Chrome/55.0.2623', 533 'iPad Puffin 5.2.0', 534 ], 535 [ 536 'Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.114 Safari/537.36 Puffin/4.8.0.2965AP', 537 'Mobile Puffin 4.8.0.2965', 538 ], 539 525 540 // QQ Browser 526 541
Note: See TracChangeset
for help on using the changeset viewer.