r65892 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65891‎ | r65892 | r65893 >
Date:03:50, 4 May 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.6 - Follow up to r65891
Modified paths:
  • /trunk/extensions/Maps/Maps_CoordinateParser.php (modified) (history)
  • /trunk/extensions/Maps/Maps_Mapper.php (modified) (history)
  • /trunk/extensions/Maps/Services/GoogleMaps/Maps_GoogleMaps.php (modified) (history)
  • /trunk/extensions/Maps/Services/GoogleMaps3/Maps_GoogleMaps3.php (modified) (history)
  • /trunk/extensions/Maps/Services/OpenLayers/Maps_OpenLayers.php (modified) (history)
  • /trunk/extensions/Maps/Services/YahooMaps/Maps_YahooMaps.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Services/GoogleMaps3/Maps_GoogleMaps3.php
@@ -49,8 +49,8 @@
5050
5151 self::initializeParams();
5252
53 - Validator::addOutputFormat( 'gmap3type', array( 'MapsGoogleMaps3', 'setGMapType' ) );
54 - Validator::addOutputFormat( 'gmap3types', array( 'MapsGoogleMaps3', 'setGMapTypes' ) );
 53+ Validator::addOutputFormat( 'gmap3type', array( __CLASS__, 'setGMapType' ) );
 54+ Validator::addOutputFormat( 'gmap3types', array( __CLASS__, 'setGMapTypes' ) );
5555
5656 return true;
5757 }
@@ -108,7 +108,7 @@
109109 *
110110 * @return string
111111 */
112 - public static function setGMapType( &$type ) {
 112+ public static function setGMapType( &$type, $name, array $parameters ) {
113113 $type = 'google.maps.MapTypeId.' . self::$mapTypes[ $type ];
114114 }
115115
@@ -119,9 +119,9 @@
120120 *
121121 * @return array
122122 */
123 - public static function setGMapTypes( array &$types ) {
 123+ public static function setGMapTypes( array &$types, $name, array $parameters ) {
124124 for ( $i = count( $types ) - 1; $i >= 0; $i-- ) {
125 - self::setGMapType( $types[$i] );
 125+ self::setGMapType( $types[$i], $name, $parameters );
126126 }
127127 }
128128
Index: trunk/extensions/Maps/Services/YahooMaps/Maps_YahooMaps.php
@@ -134,7 +134,7 @@
135135 *
136136 * @return string
137137 */
138 - public static function setYMapType( &$type ) {
 138+ public static function setYMapType( &$type, $name, array $parameters ) {
139139 $type = self::$mapTypes[ $type ];
140140 }
141141
@@ -145,7 +145,7 @@
146146 *
147147 * @return array
148148 */
149 - public static function setYMapTypes( array &$types ) {
 149+ public static function setYMapTypes( array &$types, $name, array $parameters ) {
150150 for ( $i = count( $types ) - 1; $i >= 0; $i-- ) {
151151 $types[$i] = self::$mapTypes[ $types[$i] ];
152152 }
Index: trunk/extensions/Maps/Services/OpenLayers/Maps_OpenLayers.php
@@ -205,7 +205,7 @@
206206 *
207207 * @param array $layers
208208 */
209 - public static function unpackLayerGroups( array &$layers ) {
 209+ public static function unpackLayerGroups( array &$layers, $name, array $parameters ) {
210210 global $egMapsOLLayerGroups;
211211
212212 $unpacked = array();
Index: trunk/extensions/Maps/Services/GoogleMaps/Maps_GoogleMaps.php
@@ -178,7 +178,7 @@
179179 *
180180 * @return string
181181 */
182 - public static function setGMapType( &$type ) {
 182+ public static function setGMapType( &$type, $name, array $parameters ) {
183183 $type = self::$mapTypes[ $type ];
184184 }
185185
@@ -189,7 +189,7 @@
190190 *
191191 * @return array
192192 */
193 - public static function setGMapTypes( array &$types ) {
 193+ public static function setGMapTypes( array &$types, $name, array $parameters ) {
194194 for ( $i = count( $types ) - 1; $i >= 0; $i-- ) {
195195 $types[$i] = self::$mapTypes[ $types[$i] ];
196196 }
Index: trunk/extensions/Maps/Maps_CoordinateParser.php
@@ -180,9 +180,11 @@
181181 */
182182 private static function normalizeCoordinates( $coordinates ) {
183183 $coordinates = trim( $coordinates );
 184+
184185 $coordinates = str_replace( array( '°', '°' ), Maps_GEO_DEG, $coordinates );
185186 $coordinates = str_replace( array( '´', '´' ), Maps_GEO_SEC, $coordinates );
186187 $coordinates = str_replace( array( '″', '″', Maps_GEO_SEC . Maps_GEO_SEC, '´´', '′′', '″' ), Maps_GEO_MIN, $coordinates );
 188+
187189 return str_replace( array( '′', '′', '´', '′' ), Maps_GEO_SEC, $coordinates );
188190 }
189191
Index: trunk/extensions/Maps/Maps_Mapper.php
@@ -43,7 +43,7 @@
4444 return true;
4545 }
4646
47 - public static function formatLocation( &$location ) {
 47+ public static function formatLocation( &$location, $name, array $parameters ) {
4848 if ( self::geocoderIsAvailable() ) {
4949 $location = MapsGeocoder::attemptToGeocodeToString( $location );
5050 } else {
@@ -51,10 +51,10 @@
5252 }
5353 }
5454
55 - public static function formatLocations( &$locations ) {
 55+ public static function formatLocations( &$locations, $name, array $parameters ) {
5656 $locations = (array)$locations;
5757 foreach ( $locations as &$location ) {
58 - self::formatLocation( $location );
 58+ self::formatLocation( $location, $name, $parameters );
5959 }
6060 }
6161
@@ -187,7 +187,7 @@
188188 * @param string $dimension Must be width or height.
189189 * @param number $default The default value for this dimension.
190190 */
191 - public static function setMapDimension( &$value, $dimension, $default ) {
 191+ public static function setMapDimension( &$value, $name, array $parameters, $dimension, $default ) {
192192 self::isMapDimension( $value, array(), $dimension, true, $default );
193193 }
194194

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r65891Changes for 0.3 - Implemented new meta data structurejeroendedauw03:50, 4 May 2010

Status & tagging log