r72853 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72852‎ | r72853 | r72854 >
Date:11:48, 12 September 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.7 - updated parameter definitions for display_map
Modified paths:
  • /trunk/extensions/Maps/includes/parserHooks/Maps_DisplayMap.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/includes/parserHooks/Maps_DisplayMap.php
@@ -59,21 +59,26 @@
6060 protected function getParameterInfo() {
6161 global $egMapsMapWidth, $egMapsMapHeight, $egMapsDefaultServices;
6262
63 - return array_merge( MapsMapper::getCommonParameters(), array(
64 - // TODO
65 - 'mappingservice' => array(
66 - 'default' => $egMapsDefaultServices['display_map']
67 - ),
68 - 'coordinates' => array(
69 - 'required' => true,
70 - 'tolower' => false,
71 - 'aliases' => array( 'coords', 'location', 'address' ),
72 - 'criteria' => array(
73 - new CriterionIsLocation()
74 - ),
75 - 'output-type' => 'coordinateSet',
76 - ),
77 - ) );
 63+ $params = MapsMapper::getCommonParameters();
 64+
 65+ $params['mappingservice']->default = $egMapsDefaultServices['display_map'];
 66+
 67+ $params['coordinates'] = new Parameter(
 68+ 'coordinates',
 69+ Parameter::TYPE_STRING,
 70+ null,
 71+ array( 'coords', 'location', 'address' ),
 72+ array(
 73+ new CriterionIsLocation(),
 74+ )
 75+ );
 76+
 77+ $params['coordinates']->lowerCaseValue = false;
 78+
 79+ // TODO
 80+ $params['coordinates']->outputTypes = array( 'coordinateSet' => array( 'coordinateSet' ) );
 81+
 82+ return $params;
7883 }
7984
8085 /**

Status & tagging log