r75309 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75308‎ | r75309 | r75310 >
Date:14:56, 24 October 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Some cleanup
Modified paths:
  • /trunk/extensions/Maps/Maps_Settings.php (modified) (history)
  • /trunk/extensions/Maps/includes/Maps_Layer.php (modified) (history)
  • /trunk/extensions/Maps/includes/services/GoogleMaps/Maps_GoogleMaps.php (modified) (history)
  • /trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_GoogleMaps3.php (modified) (history)
  • /trunk/extensions/Maps/includes/services/OSM/Maps_OSM.php (modified) (history)
  • /trunk/extensions/Maps/includes/services/OpenLayers/Maps_OpenLayers.php (modified) (history)
  • /trunk/extensions/Maps/includes/services/YahooMaps/Maps_YahooMaps.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Maps_Settings.php
@@ -238,10 +238,6 @@
239239 # Google Geocoder services.
240240 $egGoogleMapsKey = ''; # http://code.google.com/apis/maps/signup.html
241241
242 - # String. The Google Maps map name prefix. It can not be identical to the one
243 - # of another mapping service.
244 - $egMapsGoogleMapsPrefix = 'map_google';
245 -
246242 # Integer. The default zoom of a map. This value will only be used when the
247243 # user does not provide one.
248244 $egMapsGoogleMapsZoom = 14;
@@ -289,10 +285,6 @@
290286
291287 # Google Maps v3
292288
293 - # String. The Google Maps v3 map name prefix. It can not be identical to the
294 - # one of another mapping service.
295 - $egMapsGMaps3Prefix = 'map_google3';
296 -
297289 # Integer. The default zoom of a map. This value will only be used when the
298290 # user does not provide one.
299291 $egMapsGMaps3Zoom = 14;
@@ -318,10 +310,6 @@
319311 # Haven't got an API key yet? Get it here: https://developer.yahoo.com/wsregapp/
320312 $egYahooMapsKey = '';
321313
322 - # String. The Yahoo! maps map name prefix. It can not be identical to the one
323 - # of another mapping service.
324 - $egMapsYahooMapsPrefix = 'map_yahoo';
325 -
326314 # Array of String. The Google Maps default map types. This value will only be
327315 # used when the user does not provide one.
328316 $egMapsYahooMapsTypes = array(
@@ -354,10 +342,6 @@
355343
356344
357345 # OpenLayers
358 -
359 - # String. The OpenLayers map name prefix. It can not be identical to the one of
360 - # another mapping service.
361 - $egMapsOpenLayersPrefix = 'open_layer';
362346
363347 # Integer. The default zoom of a map. This value will only be used when the
364348 # user does not provide one.
@@ -425,10 +409,6 @@
426410 # user does not provide one.
427411 $egMapsOSMZoom = 13;
428412
429 - # String. The OSM map name prefix. It can not be identical to the one of
430 - # another mapping service.
431 - $egMapsOSMPrefix = 'map_osm';
432 -
433413 # Boolean. Thumbnail pictures on or off.
434414 $egMapsOSMThumbs = false;
435415
Index: trunk/extensions/Maps/includes/Maps_Layer.php
@@ -9,6 +9,8 @@
1010 * @ingroup Maps
1111 *
1212 * @author Jeroen De Dauw
 13+ *
 14+ * TODO: this should be probebly integrated into the mapping service system.
1315 */
1416 class MapsLayer {
1517
@@ -183,8 +185,6 @@
184186 * Returns a string containing the JavaScript definition of this layer.
185187 * Only call this function when you are sure the layer is valid!
186188 *
187 - * TODO: move this to the OpenLayers class
188 - *
189189 * @since 0.7.1
190190 *
191191 * @return string
Index: trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_GoogleMaps3.php
@@ -61,14 +61,13 @@
6262 * @since 0.6.5
6363 */
6464 public function getMapId( $increment = true ) {
65 - global $egMapsGoogleMaps3Prefix;
6665 static $mapsOnThisPage = 0;
6766
6867 if ( $increment ) {
6968 $mapsOnThisPage++;
7069 }
7170
72 - return $egMapsGoogleMaps3Prefix . '_' . $mapsOnThisPage;
 71+ return 'map_google3_' . $mapsOnThisPage;
7372 }
7473
7574 /**
Index: trunk/extensions/Maps/includes/services/YahooMaps/Maps_YahooMaps.php
@@ -104,14 +104,13 @@
105105 * @since 0.6.5
106106 */
107107 public function getMapId( $increment = true ) {
108 - global $egMapsYahooMapsPrefix;
109108 static $mapsOnThisPage = 0;
110109
111110 if ( $increment ) {
112111 $mapsOnThisPage++;
113112 }
114113
115 - return $egMapsYahooMapsPrefix . '_' . $mapsOnThisPage;
 114+ return 'map_yahoo_' . $mapsOnThisPage;
116115 }
117116
118117 /**
Index: trunk/extensions/Maps/includes/services/OpenLayers/Maps_OpenLayers.php
@@ -69,14 +69,13 @@
7070 * @since 0.6.5
7171 */
7272 public function getMapId( $increment = true ) {
73 - global $egMapsOpenLayersPrefix;
7473 static $mapsOnThisPage = 0;
7574
7675 if ( $increment ) {
7776 $mapsOnThisPage++;
7877 }
7978
80 - return $egMapsOpenLayersPrefix . '_' . $mapsOnThisPage;
 79+ return 'open_layer_' . $mapsOnThisPage;
8180 }
8281
8382 /**
Index: trunk/extensions/Maps/includes/services/GoogleMaps/Maps_GoogleMaps.php
@@ -124,14 +124,13 @@
125125 * @since 0.6.5
126126 */
127127 public function getMapId( $increment = true ) {
128 - global $egMapsGoogleMapsPrefix;
129128 static $mapsOnThisPage = 0;
130129
131130 if ( $increment ) {
132131 $mapsOnThisPage++;
133132 }
134133
135 - return $egMapsGoogleMapsPrefix . '_' . $mapsOnThisPage;
 134+ return 'map_google_' . $mapsOnThisPage;
136135 }
137136
138137 /**
Index: trunk/extensions/Maps/includes/services/OSM/Maps_OSM.php
@@ -41,14 +41,13 @@
4242 * @since 0.6.5
4343 */
4444 public function getMapId( $increment = true ) {
45 - global $egMapsOSMPrefix;
4645 static $mapsOnThisPage = 0;
4746
4847 if ( $increment ) {
4948 $mapsOnThisPage++;
5049 }
5150
52 - return $egMapsOSMPrefix . '_' . $mapsOnThisPage;
 51+ return 'map_osm_' . $mapsOnThisPage;
5352 }
5453
5554 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r75310Follow up to r75309jeroendedauw14:57, 24 October 2010

Status & tagging log