- Timestamp:
- 10/09/2017 05:36:45 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/parse.php
r6011 r6012 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| 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|PaleMoon|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, … … 165 165 elseif ( false !== ( $key = array_search( 'SamsungBrowser', $result['name'] ) ) ) { 166 166 $data['name'] = 'Samsung Browser'; 167 $data['version'] = $result['version'][ $key ]; 168 } 169 // Pale Moon 170 elseif ( false !== ( $key = array_search( 'PaleMoon', $result['name'] ) ) ) { 171 $data['name'] = 'Pale Moon'; 167 172 $data['version'] = $result['version'][ $key ]; 168 173 }
Note: See TracChangeset
for help on using the changeset viewer.