r69024 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69023‎ | r69024 | r69025 >
Date:22:10, 4 July 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.6.4 - follow up to moving service specific behavior and data to service classes done in 0.6.3.
Modified paths:
  • /trunk/extensions/Maps/Features/DisplayMap/Maps_BaseMap.php (modified) (history)
  • /trunk/extensions/Maps/Features/DisplayPoint/Maps_BasePointMap.php (modified) (history)
  • /trunk/extensions/Maps/Features/Maps_iMapParserFunction.php (modified) (history)
  • /trunk/extensions/Maps/Services/GoogleMaps/Maps_GoogleMapsDispMap.php (modified) (history)
  • /trunk/extensions/Maps/Services/GoogleMaps/Maps_GoogleMapsDispPoint.php (modified) (history)
  • /trunk/extensions/Maps/Services/GoogleMaps3/Maps_GoogleMaps3DispMap.php (modified) (history)
  • /trunk/extensions/Maps/Services/GoogleMaps3/Maps_GoogleMaps3DispPoint.php (modified) (history)
  • /trunk/extensions/Maps/Services/OpenLayers/Maps_OpenLayersDispMap.php (modified) (history)
  • /trunk/extensions/Maps/Services/OpenLayers/Maps_OpenLayersDispPoint.php (modified) (history)
  • /trunk/extensions/Maps/Services/YahooMaps/Maps_YahooMapsDispMap.php (modified) (history)
  • /trunk/extensions/Maps/Services/YahooMaps/Maps_YahooMapsDispPoint.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Services/GoogleMaps3/Maps_GoogleMaps3DispPoint.php
@@ -30,24 +30,13 @@
3131 }
3232
3333 /**
34 - * @see MapsBaseMap::doMapServiceLoad()
35 - *
36 - */
37 - public function doMapServiceLoad() {
38 - global $egGMaps3OnThisPage;
39 -
40 - $egGMaps3OnThisPage++;
41 -
42 - $this->elementNr = $egGMaps3OnThisPage;
43 - }
44 -
45 - /**
4634 * @see MapsBaseMap::addSpecificMapHTML()
4735 *
4836 */
4937 public function addSpecificMapHTML() {
5038 global $egMapsGMaps3Prefix, $egGMaps3OnThisPage;
5139
 40+ $egGMaps3OnThisPage++;
5241 $mapName = $egMapsGMaps3Prefix . '_' . $egGMaps3OnThisPage;
5342
5443 $this->output .= Html::element(
Index: trunk/extensions/Maps/Services/GoogleMaps3/Maps_GoogleMaps3DispMap.php
@@ -28,24 +28,13 @@
2929 }
3030
3131 /**
32 - * @see MapsBaseMap::doMapServiceLoad()
33 - *
34 - */
35 - public function doMapServiceLoad() {
36 - global $egGMaps3OnThisPage;
37 -
38 - $egGMaps3OnThisPage++;
39 -
40 - $this->elementNr = $egGMaps3OnThisPage;
41 - }
42 -
43 - /**
4432 * @see MapsBaseMap::addSpecificMapHTML()
4533 *
4634 */
4735 public function addSpecificMapHTML() {
4836 global $egMapsGMaps3Prefix, $egGMaps3OnThisPage;
4937
 38+ $egGMaps3OnThisPage++;
5039 $mapName = $egMapsGMaps3Prefix . '_' . $egGMaps3OnThisPage;
5140
5241 $this->output .= Html::element(
Index: trunk/extensions/Maps/Services/YahooMaps/Maps_YahooMapsDispPoint.php
@@ -28,24 +28,13 @@
2929 }
3030
3131 /**
32 - * @see MapsBaseMap::doMapServiceLoad()
33 - *
34 - */
35 - public function doMapServiceLoad() {
36 - global $egYahooMapsOnThisPage;
37 -
38 - $egYahooMapsOnThisPage++;
39 -
40 - $this->elementNr = $egYahooMapsOnThisPage;
41 - }
42 -
43 - /**
4432 * @see MapsBaseMap::addSpecificMapHTML()
4533 *
4634 */
4735 public function addSpecificMapHTML() {
4836 global $egMapsYahooMapsPrefix, $egYahooMapsOnThisPage;
4937
 38+ $egYahooMapsOnThisPage++;
5039 $mapName = $egMapsYahooMapsPrefix . '_' . $egYahooMapsOnThisPage;
5140
5241 $this->output .= Html::element(
Index: trunk/extensions/Maps/Services/YahooMaps/Maps_YahooMapsDispMap.php
@@ -21,22 +21,12 @@
2222 }
2323
2424 /**
25 - * @see MapsBaseMap::doMapServiceLoad()
26 - */
27 - public function doMapServiceLoad() {
28 - global $egYahooMapsOnThisPage;
29 -
30 - $egYahooMapsOnThisPage++;
31 -
32 - $this->elementNr = $egYahooMapsOnThisPage;
33 - }
34 -
35 - /**
3625 * @see MapsBaseMap::addSpecificMapHTML()
3726 */
3827 public function addSpecificMapHTML() {
3928 global $egMapsYahooMapsPrefix, $egYahooMapsOnThisPage;
4029
 30+ $egYahooMapsOnThisPage++;
4131 $mapName = $egMapsYahooMapsPrefix . '_' . $egYahooMapsOnThisPage;
4232
4333 $this->output .= Html::element(
@@ -69,4 +59,4 @@
7060 ) );
7161 }
7262
73 -}
 63+}
\ No newline at end of file
Index: trunk/extensions/Maps/Services/OpenLayers/Maps_OpenLayersDispPoint.php
@@ -28,17 +28,6 @@
2929 }
3030
3131 /**
32 - * @see MapsBaseMap::doMapServiceLoad()
33 - */
34 - public function doMapServiceLoad() {
35 - global $egOpenLayersOnThisPage;
36 -
37 - $egOpenLayersOnThisPage++;
38 -
39 - $this->elementNr = $egOpenLayersOnThisPage;
40 - }
41 -
42 - /**
4332 * @see MapsBaseMap::addSpecificMapHTML()
4433 */
4534 public function addSpecificMapHTML() {
@@ -46,6 +35,7 @@
4736
4837 $layerItems = $this->mService->createLayersStringAndLoadDependencies( $this->layers );
4938
 39+ $egOpenLayersOnThisPage++;
5040 $mapName = $egMapsOpenLayersPrefix . '_' . $egOpenLayersOnThisPage;
5141
5242 $this->output .= Html::element(
Index: trunk/extensions/Maps/Services/OpenLayers/Maps_OpenLayersDispMap.php
@@ -21,17 +21,6 @@
2222 }
2323
2424 /**
25 - * @see MapsBaseMap::doMapServiceLoad()
26 - */
27 - public function doMapServiceLoad() {
28 - global $egOpenLayersOnThisPage;
29 -
30 - $egOpenLayersOnThisPage++;
31 -
32 - $this->elementNr = $egOpenLayersOnThisPage;
33 - }
34 -
35 - /**
3625 * @see MapsBaseMap::addSpecificMapHTML()
3726 */
3827 public function addSpecificMapHTML() {
@@ -39,6 +28,7 @@
4029
4130 $layerItems = $this->mService->createLayersStringAndLoadDependencies( $this->layers );
4231
 32+ $egOpenLayersOnThisPage++;
4333 $mapName = $egMapsOpenLayersPrefix . '_' . $egOpenLayersOnThisPage;
4434
4535 $this->output .= Html::element(
Index: trunk/extensions/Maps/Services/GoogleMaps/Maps_GoogleMapsDispMap.php
@@ -42,22 +42,12 @@
4343 }
4444
4545 /**
46 - * @see MapsBaseMap::doMapServiceLoad()
47 - */
48 - public function doMapServiceLoad() {
49 - global $egGoogleMapsOnThisPage;
50 -
51 - $egGoogleMapsOnThisPage++;
52 -
53 - $this->elementNr = $egGoogleMapsOnThisPage;
54 - }
55 -
56 - /**
5746 * @see MapsBaseMap::addSpecificMapHTML()
5847 */
5948 public function addSpecificMapHTML() {
6049 global $egMapsGoogleMapsPrefix, $egGoogleMapsOnThisPage;
6150
 51+ $egGoogleMapsOnThisPage++;
6252 $mapName = $egMapsGoogleMapsPrefix . '_' . $egGoogleMapsOnThisPage;
6353
6454 $this->mService->addOverlayOutput( $this->output, $mapName, $this->overlays, $this->controls );
Index: trunk/extensions/Maps/Services/GoogleMaps/Maps_GoogleMapsDispPoint.php
@@ -42,17 +42,6 @@
4343 ),
4444 );
4545 }
46 -
47 - /**
48 - * @see MapsBaseMap::doMapServiceLoad()
49 - */
50 - public function doMapServiceLoad() {
51 - global $egGoogleMapsOnThisPage;
52 -
53 - $egGoogleMapsOnThisPage++;
54 -
55 - $this->elementNr = $egGoogleMapsOnThisPage;
56 - }
5746
5847 /**
5948 * @see MapsBaseMap::addSpecificMapHTML()
@@ -60,6 +49,7 @@
6150 public function addSpecificMapHTML() {
6251 global $egMapsGoogleMapsPrefix, $egGoogleMapsOnThisPage;
6352
 53+ $egGoogleMapsOnThisPage++;
6454 $mapName = $egMapsGoogleMapsPrefix . '_' . $egGoogleMapsOnThisPage;
6555
6656 $this->mService->addOverlayOutput( $this->output, $mapName, $this->overlays, $this->controls );
Index: trunk/extensions/Maps/Features/DisplayPoint/Maps_BasePointMap.php
@@ -39,6 +39,8 @@
4040 private $specificParameters = false;
4141 private $markerData = array();
4242
 43+ protected abstract function getDefaultZoom();
 44+
4345 public function __construct( MapsMappingService $service ) {
4446 $this->mService = $service;
4547 }
@@ -139,8 +141,6 @@
140142 $this->parser = $parser;
141143
142144 $this->featureParameters = MapsDisplayPoint::$parameters;
143 -
144 - $this->doMapServiceLoad();
145145
146146 $this->setMapProperties( $params );
147147
Index: trunk/extensions/Maps/Features/Maps_iMapParserFunction.php
@@ -26,11 +26,6 @@
2727 function getMapHtml( Parser &$parser, array $params );
2828
2929 /**
30 - * Map service specific map count and loading of dependencies.
31 - */
32 - function doMapServiceLoad();
33 -
34 - /**
3530 * Adds the HTML specific to the mapping service to the output.
3631 */
3732 function addSpecificMapHTML();
Index: trunk/extensions/Maps/Features/DisplayMap/Maps_BaseMap.php
@@ -35,7 +35,7 @@
3636 private $specificParameters = false;
3737 protected $featureParameters = false;
3838
39 - protected abstract function getDefaultZoom();
 39+ protected abstract function getDefaultZoom();
4040
4141 public function __construct( MapsMappingService $service ) {
4242 $this->mService = $service;
@@ -122,8 +122,6 @@
123123 $this->parser = $parser;
124124
125125 $this->featureParameters = MapsDisplayMap::$parameters;
126 -
127 - $this->doMapServiceLoad();
128126
129127 $this->setMapProperties( $params );
130128
@@ -141,12 +139,6 @@
142140 }
143141
144142 /**
145 - * Optionally override.
146 - */
147 - public function doMapServiceLoad() {
148 - }
149 -
150 - /**
151143 * Sets the $centreLat and $centreLon fields.
152144 */
153145 private function setCentre() {

Follow-up revisions

RevisionCommit summaryAuthorDate
r69058Changes for 0.6.4 - follow up to r69024jeroendedauw16:47, 5 July 2010

Status & tagging log