r65712 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65711‎ | r65712 | r65713 >
Date:19:50, 30 April 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Fixed bug 23356. Follow up to r65670.
Modified paths:
  • /trunk/extensions/Maps/Maps_Mapper.php (modified) (history)
  • /trunk/extensions/Maps/Services/GoogleMaps/Maps_GoogleMaps.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Services/GoogleMaps/Maps_GoogleMaps.php
@@ -164,7 +164,7 @@
165165 *
166166 * @return boolean
167167 */
168 - public static function isGOverlay( $value ) {
 168+ public static function isGOverlay( $value, array $metaData ) {
169169 $value = explode( '-', $value );
170170 return in_array( $value[0], self::getOverlayNames() );
171171 }
Index: trunk/extensions/Maps/Maps_Mapper.php
@@ -25,7 +25,7 @@
2626 Validator::addOutputFormat( 'coordinateSets', array( __CLASS__, 'formatLocations' ) );
2727 }
2828
29 - public static function isLocation( $location ) {
 29+ public static function isLocation( $location, array $metaData ) {
3030 if ( self::geocoderIsAvailable() ) {
3131 return MapsGeocoder::isLocation( $location );
3232 } else {
@@ -33,10 +33,10 @@
3434 }
3535 }
3636
37 - public static function areLocations( $locations ) {
 37+ public static function areLocations( $locations, array $metaData ) {
3838 $locations = (array)$locations;
3939 foreach ( $locations as $location ) {
40 - if ( !self::isLocation( $location ) ) {
 40+ if ( !self::isLocation( $location, $metaData ) ) {
4141 return false;
4242 }
4343 }
@@ -127,7 +127,7 @@
128128 *
129129 * @return boolean
130130 */
131 - public static function isMapDimension( &$value, $dimension, $correct = false, $default = 0 ) {
 131+ public static function isMapDimension( &$value, array $metaData, $dimension, $correct = false, $default = 0 ) {
132132 global $egMapsSizeRestrictions;
133133
134134 // See if the notation is valid.
@@ -188,7 +188,7 @@
189189 * @param number $default The default value for this dimension.
190190 */
191191 public static function setMapDimension( &$value, $dimension, $default ) {
192 - self::isMapDimension( $value, $dimension, true, $default );
 192+ self::isMapDimension( $value, array(), $dimension, true, $default );
193193 }
194194
195195 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r65713Fixed bug 23356. Follow up to r65670.jeroendedauw19:50, 30 April 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r65670CHanges for 0.3 - Partially added dependency handling and support for by meta...jeroendedauw21:32, 29 April 2010

Status & tagging log