r108313 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108312‎ | r108313 | r108314 >
Date:10:05, 7 January 2012
Author:jeroendedauw
Status:resolved (Comments)
Tags:
Comment:
Modified paths:
  • /trunk/extensions/Maps/Maps.php (modified) (history)
  • /trunk/extensions/Maps/includes/Maps_Geocoders.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Maps.php
@@ -287,8 +287,8 @@
288288 * @return true
289289 */
290290 function efMapsSetup() {
 291+ global $wgLogRestrictions;
291292 wfRunHooks( 'MappingServiceLoad' );
292293 wfRunHooks( 'MappingFeatureLoad' );
293 -
294294 return true;
295295 }
Index: trunk/extensions/Maps/includes/Maps_Geocoders.php
@@ -352,7 +352,8 @@
353353 if ( $geocoderIdentifier === '' || !array_key_exists( $geocoderIdentifier, self::$registeredGeocoders ) ) {
354354 if ( !$validatedDefault ) {
355355 if ( !array_key_exists( $egMapsDefaultGeoService, self::$registeredGeocoders ) ) {
356 - $egMapsDefaultGeoService = array_shift( array_keys( self::$registeredGeocoders ) );
 356+ $services = array_keys( self::$registeredGeocoders );
 357+ $egMapsDefaultGeoService = array_shift( $services );
357358 if ( is_null( $egMapsDefaultGeoService ) ) {
358359 throw new Exception( 'Tried to geocode while there are no geocoders available at ' . __METHOD__ );
359360 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r108315follow up to r108313jeroendedauw10:37, 7 January 2012

Comments

#Comment by Nikerabbit (talk | contribs)   10:34, 7 January 2012

Adds unused global.

#Comment by Jeroen De Dauw (talk | contribs)   10:37, 7 January 2012

wtf o_O My IDE must have done something funky there...

Status & tagging log