Index: trunk/extensions/Maps/ParserFunctions/Geocode/Maps_GeocodeFunctions.php |
— | — | @@ -72,47 +72,47 @@ |
73 | 73 | |
74 | 74 | $manager = new ValidatorManager(); |
75 | 75 | |
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 |
111 | 85 | ), |
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 ); |
117 | 117 | |
118 | 118 | if ( self::geocoderIsAvailable() ) { |
119 | 119 | $geovalues = MapsGeocoder::attemptToGeocodeToString( |
Index: trunk/extensions/Maps/Maps_Settings.php |
— | — | @@ -134,10 +134,10 @@ |
135 | 135 | # Recommended to be true for Maps_COORDS_DMS and false for Maps_COORDS_FLOAT. |
136 | 136 | $egMapsCoordinateDirectional = true; |
137 | 137 | |
138 | | - # Boolean. |
| 138 | + # Boolean. Sets if coordinates should be allowed in geocoding calls. |
139 | 139 | $egMapsAllowCoordsGeocoding = true; |
140 | 140 | |
141 | | - # Boolean. |
| 141 | + # Boolean. Sets if geocoded addresses should be stored in a cache. |
142 | 142 | $egMapsEnableGeoCache = true; |
143 | 143 | |
144 | 144 | |