- Timestamp:
- 02/22/2017 01:22:33 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/events/1.0/index.php
r4978 r4979 77 77 $location_name = '"' . strtr( $location_name, [ '"' => '', "'" => '' ] ) . '"'; 78 78 $row = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM geoname WHERE MATCH(name,asciiname,alternatenames) AGAINST(%s IN BOOLEAN MODE) ORDER BY FIELD(%s, country) DESC, FIELD(%s, timezone) DESC, population DESC LIMIT 1", $location_name, $country, $timezone ) ); 79 79 80 return $row; 80 81 } … … 101 102 if ( isset( $args['country'] ) ) { 102 103 return array( 103 'country' => $args['country'],104 'country' => $args['country'], 104 105 ); 105 106 } 106 107 107 108 $country_code = null; 108 if ( isset( $args['loca tion_data']['locale'] ) && preg_match( '/^[a-z]+[-_]([a-z]+)$/i', $args['location_data']['locale'], $match ) ) {109 if ( isset( $args['locale'] ) && preg_match( '/^[a-z]+[-_]([a-z]+)$/i', $args['locale'], $match ) ) { 109 110 $country_code = $match[1]; 110 111 } … … 135 136 } 136 137 } 137 138 138 139 if ( 139 140 ! empty( $args['latitude'] ) && is_numeric( $args['latitude'] ) &&
Note: See TracChangeset
for help on using the changeset viewer.