r72378 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72377‎ | r72378 | r72379 >
Date:14:43, 4 September 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Minor fix
Modified paths:
  • /trunk/extensions/Maps/Includes/Maps_Geocoders.php (modified) (history)
  • /trunk/extensions/Maps/ParserHooks/Maps_Geodistance.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/ParserHooks/Maps_Geodistance.php
@@ -103,6 +103,8 @@
104104 * @return string
105105 */
106106 public function render( array $parameters ) {
 107+ global $wgLang;
 108+
107109 $canGeocode = MapsMapper::geocoderIsAvailable();
108110
109111 if ( $canGeocode ) {
Index: trunk/extensions/Maps/Includes/Maps_Geocoders.php
@@ -170,7 +170,9 @@
171171 $coordinates = $geocoder->geocode( str_replace( ',', '', $address ) );
172172 }
173173
174 - self::cacheWrite( $address, $coordinates );
 174+ if ( $coordinates !== false ) {
 175+ self::cacheWrite( $address, $coordinates );
 176+ }
175177
176178 return $coordinates;
177179 }

Status & tagging log