r66506 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66505‎ | r66506 | r66507 >
Date:02:51, 16 May 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Imrpoved docs
Modified paths:
  • /trunk/extensions/Maps/Maps_Settings.php (modified) (history)
  • /trunk/extensions/Maps/ParserFunctions/Geocode/Maps_GeocodeFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/ParserFunctions/Geocode/Maps_GeocodeFunctions.php
@@ -72,47 +72,47 @@
7373
7474 $manager = new ValidatorManager();
7575
76 - $doGeocoding = $manager->manageParameters(
77 - $args,
78 - array(
79 - 'location' => array(
80 - 'required' => true
81 - ),
82 - 'mappingservice' => array(
83 - 'criteria' => array(
84 - 'in_array' => $egMapsAvailableServices
85 - ),
86 - 'default' => false
87 - ),
88 - 'service' => array(
89 - 'criteria' => array(
90 - 'in_array' => $egMapsAvailableGeoServices
91 - ),
92 - 'default' => $egMapsDefaultGeoService
93 - ),
94 - 'format' => array(
95 - 'criteria' => array(
96 - 'in_array' => $egMapsAvailableCoordNotations
97 - ),
98 - 'aliases' => array(
99 - 'notation'
100 - ),
101 - 'default' => $egMapsCoordinateNotation
102 - ),
103 - 'allowcoordinates' => array(
104 - 'type' => 'boolean',
105 - 'default' => $egMapsAllowCoordsGeocoding
106 - ),
107 - 'directional' => array(
108 - 'type' => 'boolean',
109 - 'default' => $egMapsCoordinateDirectional
110 - ),
 76+$doGeocoding = $manager->manageParameters(
 77+ $args,
 78+ array(
 79+ 'location' => array(
 80+ 'required' => true
 81+ ),
 82+ 'mappingservice' => array(
 83+ 'criteria' => array(
 84+ 'in_array' => $egMapsAvailableServices
11185 ),
112 - array( 'location', 'service', 'mappingservice' )
113 - );
114 -
115 - if ( $doGeocoding ) {
116 - $parameters = $manager->getParameters( false );
 86+ 'default' => false
 87+ ),
 88+ 'service' => array(
 89+ 'criteria' => array(
 90+ 'in_array' => $egMapsAvailableGeoServices
 91+ ),
 92+ 'default' => $egMapsDefaultGeoService
 93+ ),
 94+ 'format' => array(
 95+ 'criteria' => array(
 96+ 'in_array' => $egMapsAvailableCoordNotations
 97+ ),
 98+ 'aliases' => array(
 99+ 'notation'
 100+ ),
 101+ 'default' => $egMapsCoordinateNotation
 102+ ),
 103+ 'allowcoordinates' => array(
 104+ 'type' => 'boolean',
 105+ 'default' => $egMapsAllowCoordsGeocoding
 106+ ),
 107+ 'directional' => array(
 108+ 'type' => 'boolean',
 109+ 'default' => $egMapsCoordinateDirectional
 110+ ),
 111+ ),
 112+ array( 'location', 'service', 'mappingservice' )
 113+);
 114+
 115+if ( $doGeocoding ) {
 116+ $parameters = $manager->getParameters( false );
117117
118118 if ( self::geocoderIsAvailable() ) {
119119 $geovalues = MapsGeocoder::attemptToGeocodeToString(
Index: trunk/extensions/Maps/Maps_Settings.php
@@ -134,10 +134,10 @@
135135 # Recommended to be true for Maps_COORDS_DMS and false for Maps_COORDS_FLOAT.
136136 $egMapsCoordinateDirectional = true;
137137
138 - # Boolean.
 138+ # Boolean. Sets if coordinates should be allowed in geocoding calls.
139139 $egMapsAllowCoordsGeocoding = true;
140140
141 - # Boolean.
 141+ # Boolean. Sets if geocoded addresses should be stored in a cache.
142142 $egMapsEnableGeoCache = true;
143143
144144

Status & tagging log