http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60019
Revision: 60019 Author: jeroendedauw Date: 2009-12-13 21:13:22 +0000 (Sun, 13 Dec 2009) Log Message: ----------- Fixed parameter result types Modified Paths: -------------- trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispMap.php trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispPoint.php trunk/extensions/Maps/OpenLayers/Maps_OpenLayers.php trunk/extensions/Maps/OpenLayers/Maps_OpenLayersDispMap.php trunk/extensions/Maps/OpenLayers/Maps_OpenLayersDispPoint.php trunk/extensions/Maps/OpenStreetMap/Maps_OSM.php trunk/extensions/Maps/OpenStreetMap/Maps_OSMDispMap.php trunk/extensions/Maps/OpenStreetMap/Maps_OSMDispPoint.php trunk/extensions/Maps/YahooMaps/Maps_YahooMaps.php trunk/extensions/Maps/YahooMaps/Maps_YahooMapsDispMap.php trunk/extensions/Maps/YahooMaps/Maps_YahooMapsDispPoint.php Modified: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php =================================================================== --- trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php 2009-12-13 20:55:09 UTC (rev 60018) +++ trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php 2009-12-13 21:13:22 UTC (rev 60019) @@ -56,7 +56,7 @@ 'default' => $egMapsGoogleMapsZoom, ), 'controls' => array( - 'type' => 'list-string', + 'type' => 'list', 'criteria' => array( 'all_in_array' => self::getControlNames() ), @@ -70,6 +70,7 @@ 'default' => $egMapsGoogleMapsType ), 'types' => array ( + 'type' => 'list', 'aliases' => array('map-types', 'map types'), 'criteria' => array( 'all_in_array' => $allowedTypes Modified: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispMap.php =================================================================== --- trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispMap.php 2009-12-13 20:55:09 UTC (rev 60018) +++ trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispMap.php 2009-12-13 21:13:22 UTC (rev 60019) @@ -59,14 +59,12 @@ $this->type = MapsGoogleMaps::getGMapType($this->type, true); - $this->controls = MapsMapper::createJSItemsString(explode(',', $this->controls)); + $this->controls = MapsMapper::createJSItemsString($this->controls); $onloadFunctions = MapsGoogleMaps::addOverlayOutput($this->output, $this->mapName, $this->overlays, $this->controls); $this->autozoom = MapsGoogleMaps::getAutozoomJSValue($this->autozoom); - $this->types = explode(",", $this->types); - $typesString = MapsGoogleMaps::createTypesString($this->types); $this->output .=<<<END Modified: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispPoint.php =================================================================== --- trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispPoint.php 2009-12-13 20:55:09 UTC (rev 60018) +++ trunk/extensions/Maps/GoogleMaps/Maps_GoogleMapsDispPoint.php 2009-12-13 21:13:22 UTC (rev 60019) @@ -69,13 +69,13 @@ $this->type = MapsGoogleMaps::getGMapType($this->type, true); - $this->controls = MapsMapper::createJSItemsString(explode(',', $this->controls)); + $this->controls = MapsMapper::createJSItemsString($this->controls); $onloadFunctions = MapsGoogleMaps::addOverlayOutput($this->output, $this->mapName, $this->overlays, $this->controls); $this->autozoom = MapsGoogleMaps::getAutozoomJSValue($this->autozoom); - $this->types = explode(",", $this->types); + $this->types = $this->types; $typesString = MapsGoogleMaps::createTypesString($this->types); Modified: trunk/extensions/Maps/OpenLayers/Maps_OpenLayers.php =================================================================== --- trunk/extensions/Maps/OpenLayers/Maps_OpenLayers.php 2009-12-13 20:55:09 UTC (rev 60018) +++ trunk/extensions/Maps/OpenLayers/Maps_OpenLayers.php 2009-12-13 21:13:22 UTC (rev 60019) @@ -58,14 +58,14 @@ 'default' => $egMapsOpenLayersZoom, ), 'controls' => array( - 'type' => 'list-string', + 'type' => 'list', 'criteria' => array( 'all_in_array' => self::getControlNames() ), 'default' => $egMapsOLControls ), 'layers' => array( - 'type' => 'list-string', + 'type' => 'list', 'criteria' => array( 'all_in_array' => self::getLayerNames() ), @@ -84,14 +84,14 @@ */ public static function getControlNames() { return array( - 'ArgParser', 'Attribution', 'Button', 'DragFeature', 'DragPan', - 'DrawFeature', 'EditingToolbar', 'GetFeature', 'KeyboardDefaults', 'LayerSwitcher', - 'Measure', 'ModifyFeature', 'MouseDefaults', 'MousePosition', 'MouseToolbar', - 'Navigation', 'NavigationHistory', 'NavToolbar', 'OverviewMap', 'Pan', - 'Panel', 'PanPanel', 'PanZoom', 'PanZoomBar', 'AutoPanZoom', 'Permalink', - 'Scale', 'ScaleLine', 'SelectFeature', 'Snapping', 'Split', - 'WMSGetFeatureInfo', 'ZoomBox', 'ZoomIn', 'ZoomOut', 'ZoomPanel', - 'ZoomToMaxExtent' + 'argparser', 'attribution', 'button', 'dragfeature', 'dragpan', + 'drawfeature', 'editingtoolbar', 'getfeature', 'keyboarddefaults', 'layerswitcher', + 'measure', 'modifyfeature', 'mousedefaults', 'mouseposition', 'mousetoolbar', + 'navigation', 'navigationhistory', 'navtoolbar', 'overviewmap', 'pan', + 'panel', 'panpanel', 'panzoom', 'panzoombar', 'autopanzoom', 'permalink', + 'scale', 'scaleline', 'selectfeature', 'snapping', 'split', + 'wmsgetfeatureinfo', 'zoombox', 'zoomin', 'zoomout', 'zoompanel', + 'zoomtomaxextent' ); } @@ -170,9 +170,7 @@ * @param string $layers * @return csv string */ - public static function createLayersStringAndLoadDependencies(&$output, $layers) { - $layers = explode(',', $layers); - + public static function createLayersStringAndLoadDependencies(&$output, array $layers) { $layerItems = ''; foreach ($layers as $layer) { $layer = strtolower($layer); Modified: trunk/extensions/Maps/OpenLayers/Maps_OpenLayersDispMap.php =================================================================== --- trunk/extensions/Maps/OpenLayers/Maps_OpenLayersDispMap.php 2009-12-13 20:55:09 UTC (rev 60018) +++ trunk/extensions/Maps/OpenLayers/Maps_OpenLayersDispMap.php 2009-12-13 21:13:22 UTC (rev 60019) @@ -48,7 +48,7 @@ public function addSpecificMapHTML() { global $wgJsMimeType; - $controlItems = MapsMapper::createJSItemsString(explode(',', $this->controls)); + $controlItems = MapsMapper::createJSItemsString($this->controls); $layerItems = MapsOpenLayers::createLayersStringAndLoadDependencies($this->output, $this->layers); Modified: trunk/extensions/Maps/OpenLayers/Maps_OpenLayersDispPoint.php =================================================================== --- trunk/extensions/Maps/OpenLayers/Maps_OpenLayersDispPoint.php 2009-12-13 20:55:09 UTC (rev 60018) +++ trunk/extensions/Maps/OpenLayers/Maps_OpenLayersDispPoint.php 2009-12-13 21:13:22 UTC (rev 60019) @@ -62,9 +62,8 @@ public function addSpecificMapHTML() { global $wgJsMimeType; - $controlItems = MapsMapper::createJSItemsString(explode(',', $this->controls)); + $controlItems = MapsMapper::createJSItemsString($this->controls); - //var_dump($this->layers);die(); $layerItems = MapsOpenLayers::createLayersStringAndLoadDependencies($this->output, $this->layers); $this->output .= "<div id='$this->mapName' style='width: {$this->width}px; height: {$this->height}px; background-color: #cccccc;'></div> Modified: trunk/extensions/Maps/OpenStreetMap/Maps_OSM.php =================================================================== --- trunk/extensions/Maps/OpenStreetMap/Maps_OSM.php 2009-12-13 20:55:09 UTC (rev 60018) +++ trunk/extensions/Maps/OpenStreetMap/Maps_OSM.php 2009-12-13 21:13:22 UTC (rev 60019) @@ -56,7 +56,7 @@ 'default' => $egMapsOSMZoom, ), 'controls' => array( - 'type' => 'list-string', + 'type' => 'list', 'criteria' => array( 'all_in_array' => self::getControlNames() ), Modified: trunk/extensions/Maps/OpenStreetMap/Maps_OSMDispMap.php =================================================================== --- trunk/extensions/Maps/OpenStreetMap/Maps_OSMDispMap.php 2009-12-13 20:55:09 UTC (rev 60018) +++ trunk/extensions/Maps/OpenStreetMap/Maps_OSMDispMap.php 2009-12-13 21:13:22 UTC (rev 60019) @@ -65,7 +65,7 @@ public function addSpecificMapHTML() { global $wgJsMimeType; - $controlItems = MapsMapper::createJSItemsString(explode(',', $this->controls)); + $controlItems = MapsMapper::createJSItemsString($this->controls); $this->output .= <<<EOT <script type='$wgJsMimeType'>slippymaps['$this->mapName'] = new slippymap_map('$this->mapName', { Modified: trunk/extensions/Maps/OpenStreetMap/Maps_OSMDispPoint.php =================================================================== --- trunk/extensions/Maps/OpenStreetMap/Maps_OSMDispPoint.php 2009-12-13 20:55:09 UTC (rev 60018) +++ trunk/extensions/Maps/OpenStreetMap/Maps_OSMDispPoint.php 2009-12-13 21:13:22 UTC (rev 60019) @@ -61,7 +61,7 @@ public function addSpecificMapHTML() { global $wgJsMimeType; - $controlItems = MapsMapper::createJSItemsString(explode(',', $this->controls)); + $controlItems = MapsMapper::createJSItemsString($this->controls); $this->output .= <<<EOT <script type='$wgJsMimeType'>slippymaps['$this->mapName'] = new slippymap_map('$this->mapName', { Modified: trunk/extensions/Maps/YahooMaps/Maps_YahooMaps.php =================================================================== --- trunk/extensions/Maps/YahooMaps/Maps_YahooMaps.php 2009-12-13 20:55:09 UTC (rev 60018) +++ trunk/extensions/Maps/YahooMaps/Maps_YahooMaps.php 2009-12-13 21:13:22 UTC (rev 60019) @@ -56,7 +56,7 @@ 'default' => $egMapsYahooMapsZoom ), 'controls' => array( - 'type' => 'list-string', + 'type' => 'list', 'criteria' => array( 'all_in_array' => self::getControlNames() ), @@ -70,7 +70,7 @@ 'default' => $egMapsYahooMapsType ), 'types' => array ( - 'type' => 'list-string', + 'type' => 'list', 'aliases' => array('map-types', 'map types'), 'criteria' => array( 'all_in_array' => $allowedTypes Modified: trunk/extensions/Maps/YahooMaps/Maps_YahooMapsDispMap.php =================================================================== --- trunk/extensions/Maps/YahooMaps/Maps_YahooMapsDispMap.php 2009-12-13 20:55:09 UTC (rev 60018) +++ trunk/extensions/Maps/YahooMaps/Maps_YahooMapsDispMap.php 2009-12-13 21:13:22 UTC (rev 60019) @@ -50,11 +50,9 @@ $this->type = MapsYahooMaps::getYMapType($this->type, true); - $this->controls = MapsMapper::createJSItemsString(explode(',', $this->controls)); + $this->controls = MapsMapper::createJSItemsString($this->controls); $this->autozoom = MapsYahooMaps::getAutozoomJSValue($this->autozoom); - - $this->types = explode(",", $this->types); $typesString = MapsYahooMaps::createTypesString($this->types); Modified: trunk/extensions/Maps/YahooMaps/Maps_YahooMapsDispPoint.php =================================================================== --- trunk/extensions/Maps/YahooMaps/Maps_YahooMapsDispPoint.php 2009-12-13 20:55:09 UTC (rev 60018) +++ trunk/extensions/Maps/YahooMaps/Maps_YahooMapsDispPoint.php 2009-12-13 21:13:22 UTC (rev 60019) @@ -63,11 +63,9 @@ $this->type = MapsYahooMaps::getYMapType($this->type, true); - $this->controls = MapsMapper::createJSItemsString(explode(',', $this->controls)); + $this->controls = MapsMapper::createJSItemsString($this->controls); $this->autozoom = MapsYahooMaps::getAutozoomJSValue($this->autozoom); - - $this->types = explode(',', $this->types); $typesString = MapsYahooMaps::createTypesString($this->types); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs