r61696 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61695‎ | r61696 | r61697 >
Date:23:41, 29 January 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.5.3.
Modified paths:
  • /trunk/extensions/Maps/Maps.php (modified) (history)
  • /trunk/extensions/Maps/OpenLayers/Maps_OpenLayers.php (modified) (history)
  • /trunk/extensions/Maps/OpenLayers/OpenLayerFunctions.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/OpenLayers/OpenLayerFunctions.js
@@ -235,7 +235,7 @@
236236 } else {
237237 marker = new OpenLayers.Marker(markerData.lonlat);
238238 }
239 -
 239+
240240 if (markerData.title.length + markerData.label.length > 0 ) {
241241
242242 // This is the handler for the mousedown event on the marker, and displays the popup
@@ -257,7 +257,7 @@
258258 );
259259
260260 }
261 -
 261+
262262 return marker;
263263 }
264264
Index: trunk/extensions/Maps/OpenLayers/Maps_OpenLayers.php
@@ -64,7 +64,7 @@
6565 ),
6666 'default' => $egMapsOLControls ,
6767 'output-type' => array('list', ',', '\'')
68 - ),
 68+ ),
6969 'layers' => array(
7070 'type' => array('string', 'list'),
7171 'criteria' => array(
@@ -152,14 +152,14 @@
153153 */
154154 public static function addOLDependencies(&$output) {
155155 global $wgJsMimeType;
156 - global $egOpenLayersOnThisPage, $egMapsScriptPath;
 156+ global $egOpenLayersOnThisPage, $egMapsScriptPath, $egMapsStyleVersion;
157157
158158 if (empty($egOpenLayersOnThisPage)) {
159159 $egOpenLayersOnThisPage = 0;
160160
161161 $output .="<link rel='stylesheet' href='$egMapsScriptPath/OpenLayers/OpenLayers/theme/default/style.css' type='text/css' />
162162 <script type='$wgJsMimeType' src='$egMapsScriptPath/OpenLayers/OpenLayers/OpenLayers.js'></script>
163 - <script type='$wgJsMimeType' src='$egMapsScriptPath/OpenLayers/OpenLayerFunctions.min.js'></script>
 163+ <script type='$wgJsMimeType' src='$egMapsScriptPath/OpenLayers/OpenLayerFunctions.js?$egMapsStyleVersion'></script>
164164 <script type='$wgJsMimeType'>initOLSettings(200, 100);</script>\n";
165165 }
166166 }
@@ -172,14 +172,8 @@
173173 * @return csv string
174174 */
175175 public static function createLayersStringAndLoadDependencies(&$output, array $layers) {
176 - $layerItems = '';
177 - foreach ($layers as $layer) {
178 - $layer = strtolower($layer);
179 - $layerItems .= "'$layer'" . ',';
180 - self::loadDependencyWhenNeeded($output, $layer);
181 - }
182 -
183 - return rtrim($layerItems, ',');
 176+ foreach ($layers as $layer) self::loadDependencyWhenNeeded($output, $layer);
 177+ return "'" . implode("','", $layers) . "'";
184178 }
185179
186180 }
Index: trunk/extensions/Maps/Maps.php
@@ -33,7 +33,7 @@
3434 echo '<b>Warning:</b> You need to have <a href="http://www.mediawiki.org/wiki/Extension:Validator">Validator</a> installed in order to use <a href="http://www.mediawiki.org/wiki/Extension:Maps">Maps</a>.';
3535 }
3636 else {
37 - define('Maps_VERSION', '0.5.3 a4');
 37+ define('Maps_VERSION', '0.5.3 a5');
3838
3939 $egMapsScriptPath = $wgScriptPath . '/extensions/Maps';
4040 $egMapsIP = $IP . '/extensions/Maps';

Status & tagging log