r65815 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65814‎ | r65815 | r65816 >
Date:19:30, 2 May 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Fixed direction label bug
Modified paths:
  • /trunk/extensions/Maps/Maps_CoordinateParser.php (modified) (history)
  • /trunk/extensions/Maps/Maps_Settings.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Maps_Settings.php
@@ -110,7 +110,7 @@
111111
112112 # Boolean. Indicates if coordinates should be outputted in directional notation by default.
113113 # Recommended to be true for Maps_COORDS_DMS and false for Maps_COORDS_FLOAT.
114 -$egMapsCoordinateDirectional = false;
 114+$egMapsCoordinateDirectional = true;
115115
116116 # Boolean.
117117 $egMapsAllowCoordsGeocoding = true;
Index: trunk/extensions/Maps/Maps_CoordinateParser.php
@@ -377,10 +377,10 @@
378378 * @param boolean $isLat Should be true for latitudes and false for longitudes.
379379 *
380380 * @return string
381 - *
382 - * FIXME: Notice: Undefined variable: mI18nDirections in ...\Maps\Maps_CoordinateParser.php on line 388
383381 */
384382 private static function setDirectionalAngle( $coordinate, $isLat ) {
 383+ self::initializeDirectionLabels();
 384+
385385 $isNegative = substr( $coordinate, 0, 1 ) == '-';
386386 if ( $isNegative ) $coordinate = substr( $coordinate, 1 );
387387
@@ -389,7 +389,7 @@
390390 } else {
391391 $directionChar = self::$mI18nDirections[ $isNegative ? 'W' : 'E' ];
392392 }
393 -
 393+
394394 return $coordinate . ' ' . $directionChar;
395395 }
396396

Status & tagging log