r60373 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60372‎ | r60373 | r60374 >
Date:22:16, 24 December 2009
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.5.1. Changes for 0.5.1. Modified parameter definitions to work Validator 0.2.
Modified paths:
  • /trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFormInput.php (modified) (history)
  • /trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsQP.php (modified) (history)
  • /trunk/extensions/SemanticMaps/SemanticMaps.php (modified) (history)
  • /trunk/extensions/SemanticMaps/YahooMaps/SM_YahooMapsFormInput.php (modified) (history)
  • /trunk/extensions/SemanticMaps/YahooMaps/SM_YahooMapsQP.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/YahooMaps/SM_YahooMapsQP.php
@@ -53,9 +53,7 @@
5454 */
5555 protected function addSpecificMapHTML() {
5656 global $wgJsMimeType;
57 -
58 - $this->type = MapsYahooMaps::getYMapType($this->type, true);
59 -
 57+
6058 $this->autozoom = MapsYahooMaps::getAutozoomJSValue($this->autozoom);
6159
6260 $markerItems = array();
@@ -70,16 +68,14 @@
7169 $markerItems[] = "getYMarkerData($lat, $lon, '$title', '$label', '$icon')";
7270 }
7371
74 - $markersString = implode(',', $markerItems);
 72+ $markersString = implode(',', $markerItems);
7573
76 - $typesString = MapsYahooMaps::createTypesString($this->types);
77 -
7874 $this->output .= "
7975 <div id='$this->mapName' style='width: {$this->width}px; height: {$this->height}px;'></div>
8076
8177 <script type='$wgJsMimeType'>/*<![CDATA[*/
8278 addOnloadHook(
83 - initializeYahooMap('$this->mapName', $this->centre_lat, $this->centre_lon, $this->zoom, $this->type, [$typesString], [$this->controls], $this->autozoom, [$markersString], $this->height)
 79+ initializeYahooMap('$this->mapName', $this->centre_lat, $this->centre_lon, $this->zoom, $this->type, [$this->types], [$this->controls], $this->autozoom, [$markersString], $this->height)
8480 );
8581 /*]]>*/</script>";
8682
Index: trunk/extensions/SemanticMaps/YahooMaps/SM_YahooMapsFormInput.php
@@ -70,12 +70,8 @@
7171 protected function addSpecificMapHTML() {
7272 global $wgJsMimeType;
7373
74 - $type = MapsYahooMaps::getYMapType($this->type, true);
 74+ $this->autozoom = MapsYahooMaps::getAutozoomJSValue($this->autozoom);
7575
76 - $this->autozoom = MapsYahooMaps::getAutozoomJSValue($this->autozoom);
77 -
78 - $typesString = MapsYahooMaps::createTypesString($this->types);
79 -
8076 $this->output .="
8177 <div id='".$this->mapName."' style='width: {$this->width}px; height: {$this->height}px;'></div>
8278
Index: trunk/extensions/SemanticMaps/SemanticMaps.php
@@ -35,7 +35,7 @@
3636
3737 // Only initialize the extension when all dependencies are present.
3838 if (defined( 'Maps_VERSION' ) && defined( 'SMW_VERSION' )) {
39 - define('SM_VERSION', '0.5.1 a4');
 39+ define('SM_VERSION', '0.5.1 a5');
4040
4141 $smgScriptPath = $wgScriptPath . '/extensions/SemanticMaps';
4242 $smgIP = $IP . '/extensions/SemanticMaps';
Index: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsQP.php
@@ -67,9 +67,6 @@
6868 */
6969 protected function addSpecificMapHTML() {
7070 global $wgJsMimeType;
71 -
72 - // Get the Google Maps names for the control and map types.
73 - $this->type = MapsGoogleMaps::getGMapType($this->type, true);
7471
7572 $onloadFunctions = MapsGoogleMaps::addOverlayOutput($this->output, $this->mapName, $this->overlays, $this->controls);
7673
@@ -89,8 +86,6 @@
9087 // Create a string containing the marker JS
9188 $markersString = implode(',', $markerItems);
9289
93 - $typesString = MapsGoogleMaps::createTypesString($this->types);
94 -
9590 $this->output .= <<<END
9691 <div id="$this->mapName" class="$this->class" style="$this->style" ></div>
9792 <script type="$wgJsMimeType"> /*<![CDATA[*/
@@ -103,7 +98,7 @@
10499 lon: $this->centre_lon,
105100 zoom: $this->zoom,
106101 type: $this->type,
107 - types: [$typesString],
 102+ types: [$this->types],
108103 controls: [$this->controls],
109104 scrollWheelZoom: $this->autozoom
110105 },
Index: trunk/extensions/SemanticMaps/GoogleMaps/SM_GoogleMapsFormInput.php
@@ -74,16 +74,12 @@
7575
7676 $this->autozoom = MapsGoogleMaps::getAutozoomJSValue($this->autozoom);
7777
78 - $this->type = MapsGoogleMaps::getGMapType($this->type, true);
79 -
8078 // Remove the overlays control in case it's present.
8179 if (in_string('overlays', $this->controls)) {
8280 $this->controls = str_replace(",'overlays'", '', $this->controls);
8381 $this->controls = str_replace("'overlays',", '', $this->controls);
8482 }
8583
86 - $typesString = MapsGoogleMaps::createTypesString($this->types);
87 -
8884 $this->output .= "
8985 <div id='".$this->mapName."' class='".$this->class."'></div>
9086
@@ -99,7 +95,7 @@
10096 lon: $this->centre_lon,
10197 zoom: $this->zoom,
10298 type: $this->type,
103 - types: [$typesString],
 99+ types: [$this->types],
104100 controls: [$this->controls],
105101 scrollWheelZoom: $this->autozoom
106102 },

Status & tagging log