https://www.mediawiki.org/wiki/Special:Code/MediaWiki/108313

Revision: 108313
Author:   jeroendedauw
Date:     2012-01-07 10:05:16 +0000 (Sat, 07 Jan 2012)
Log Message:
-----------
fix bug 33577

Modified Paths:
--------------
    trunk/extensions/Maps/Maps.php
    trunk/extensions/Maps/includes/Maps_Geocoders.php

Modified: trunk/extensions/Maps/Maps.php
===================================================================
--- trunk/extensions/Maps/Maps.php      2012-01-07 09:56:14 UTC (rev 108312)
+++ trunk/extensions/Maps/Maps.php      2012-01-07 10:05:16 UTC (rev 108313)
@@ -287,8 +287,8 @@
  * @return true
  */
 function efMapsSetup() {
+       global $wgLogRestrictions;
        wfRunHooks( 'MappingServiceLoad' );
        wfRunHooks( 'MappingFeatureLoad' );
-
        return true;
 }

Modified: trunk/extensions/Maps/includes/Maps_Geocoders.php
===================================================================
--- trunk/extensions/Maps/includes/Maps_Geocoders.php   2012-01-07 09:56:14 UTC 
(rev 108312)
+++ trunk/extensions/Maps/includes/Maps_Geocoders.php   2012-01-07 10:05:16 UTC 
(rev 108313)
@@ -352,7 +352,8 @@
                if ( $geocoderIdentifier === '' || !array_key_exists( 
$geocoderIdentifier, self::$registeredGeocoders ) ) {
                        if ( !$validatedDefault ) {
                                if ( !array_key_exists( 
$egMapsDefaultGeoService, self::$registeredGeocoders ) ) {
-                                       $egMapsDefaultGeoService = array_shift( 
array_keys( self::$registeredGeocoders ) );
+                                       $services = array_keys( 
self::$registeredGeocoders );
+                                       $egMapsDefaultGeoService = array_shift( 
$services );
                                        if ( is_null( $egMapsDefaultGeoService 
) ) {
                                                throw new Exception( 'Tried to 
geocode while there are no geocoders available at ' . __METHOD__  );
                                        }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to