- Timestamp:
- 09/28/2017 04:30:41 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
r5967 r5971 40 40 41 41 if ( preg_match( 42 '/^.+?(?P<platform> Android|iPhone|iPad|Windows|Linux|Macintosh|Windows Phone OS|RIM Tablet OS|PlayBook)(?: (NT|zvav))*(?: [ix]?[0-9._]+)*(;|\))/im',42 '/^.+?(?P<platform>Windows Phone( OS)?|Android|iPhone|iPad|Windows|Linux|Macintosh|RIM Tablet OS|PlayBook)(?: (NT|zvav))*(?: [ix]?[0-9._]+)*(;|\))/im', 43 43 $user_agent, 44 44 $regs … … 50 50 if ( 'Linux' === $data['platform'] && false !== strpos( $user_agent, 'Android' ) ) { 51 51 $data['platform'] = 'Android'; 52 } elseif ( 'Windows Phone' === $data['platform'] ) { 53 $data['platform'] = 'Windows Phone OS'; 52 54 } 53 55 … … 116 118 // IE 11 and beyond have switched to Trident 117 119 // http://msdn.microsoft.com/en-us/library/ie/hh869301%28v=vs.85%29.aspx 118 $data['name'] = 'Internet Explorer'; 119 if( '7.0' == $result['version'][0] ) { 120 if ( $key = array_search( 'IEMobile', $result['name'] ) ) { 121 $data['name'] = 'Internet Explorer Mobile'; 122 } else { 123 $data['name'] = 'Internet Explorer'; 124 } 125 if ( '7.0' == $result['version'][0] ) { 120 126 $data['version'] = '11'; 121 127 }
Note: See TracChangeset
for help on using the changeset viewer.