Index: trunk/extensions/Maps/ParserFunctions/GeoFunctions/Maps_GeoFunctions.php |
— | — | @@ -61,7 +61,7 @@ |
62 | 62 | |
63 | 63 | $manager = new ValidatorManager(); |
64 | 64 | |
65 | | - $parameters = $manager->manageParameters( |
| 65 | + $doCalculation = $manager->manageParameters( |
66 | 66 | $args, |
67 | 67 | array( |
68 | 68 | 'location1' => array( |
— | — | @@ -74,9 +74,9 @@ |
75 | 75 | array( 'location1', 'location2' ) |
76 | 76 | ); |
77 | 77 | |
78 | | - $doCalculation = $parameters !== false; |
79 | | - |
80 | 78 | if ( $doCalculation ) { |
| 79 | + $parameters = $manager->getParameters( false ); |
| 80 | + |
81 | 81 | $canGeocode = MapsMapper::geocoderIsAvailable(); |
82 | 82 | |
83 | 83 | if ( $canGeocode ) { |
— | — | @@ -144,7 +144,7 @@ |
145 | 145 | |
146 | 146 | $manager = new ValidatorManager(); |
147 | 147 | |
148 | | - $parameters = $manager->manageParameters( |
| 148 | + $doCalculation = $manager->manageParameters( |
149 | 149 | $args, |
150 | 150 | array( |
151 | 151 | 'location' => array( |
— | — | @@ -190,9 +190,10 @@ |
191 | 191 | ), |
192 | 192 | array( 'location', 'bearing', 'distance' ) |
193 | 193 | ); |
194 | | - $doCalculation = $parameters !== false; |
195 | 194 | |
196 | 195 | if ( $doCalculation ) { |
| 196 | + $parameters = $manager->getParameters( false ); |
| 197 | + |
197 | 198 | $canGeocode = MapsMapper::geocoderIsAvailable(); |
198 | 199 | |
199 | 200 | if ( $canGeocode ) { |
Index: trunk/extensions/Maps/ParserFunctions/Geocode/Maps_GeocodeFunctions.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | |
74 | 74 | $manager = new ValidatorManager(); |
75 | 75 | |
76 | | - $parameters = $manager->manageParameters( |
| 76 | + $doGeocoding = $manager->manageParameters( |
77 | 77 | $args, |
78 | 78 | array( |
79 | 79 | 'location' => array( |
— | — | @@ -111,9 +111,9 @@ |
112 | 112 | array( 'location', 'service', 'mappingservice' ) |
113 | 113 | ); |
114 | 114 | |
115 | | - $doGeocoding = $parameters !== false; |
116 | | - |
117 | 115 | if ( $doGeocoding ) { |
| 116 | + $parameters = $manager->getParameters( false ); |
| 117 | + |
118 | 118 | if ( self::geocoderIsAvailable() ) { |
119 | 119 | $geovalues = MapsGeocoder::attemptToGeocodeToString( |
120 | 120 | $parameters['location'], |
Index: trunk/extensions/Maps/ParserFunctions/Coordinates/Maps_Coordinates.php |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | |
53 | 53 | $manager = new ValidatorManager(); |
54 | 54 | |
55 | | - $parameters = $manager->manageParameters( |
| 55 | + $doFormatting = $manager->manageParameters( |
56 | 56 | $args, |
57 | 57 | array( |
58 | 58 | 'location' => array( |
— | — | @@ -74,9 +74,9 @@ |
75 | 75 | array( 'location', 'format', 'directional' ) |
76 | 76 | ); |
77 | 77 | |
78 | | - $doFormatting = $parameters !== false; |
79 | | - |
80 | 78 | if ( $doFormatting ) { |
| 79 | + $parameters = $manager->getParameters( false ); |
| 80 | + |
81 | 81 | $parsedCoords = MapsCoordinateParser::parseCoordinates( $parameters['location'] ); |
82 | 82 | |
83 | 83 | if ( $parsedCoords ) { |
Index: trunk/extensions/Maps/Features/Maps_ParserFunctions.php |
— | — | @@ -88,17 +88,15 @@ |
89 | 89 | $parameterInfo = array_merge_recursive( $parameterInfo, $egMapsServices[$service]['parameters'] ); |
90 | 90 | $parameterInfo = array_merge_recursive( $parameterInfo, $mapClass->getSpecificParameterInfo() ); |
91 | 91 | |
92 | | - $parameters = $manager->manageParameters( |
| 92 | + $displayMap = $manager->manageParameters( |
93 | 93 | $parameters, |
94 | 94 | $parameterInfo, |
95 | 95 | array( 'coordinates' ) |
96 | 96 | ); |
97 | | - |
98 | | - $displayMap = $parameters !== false; |
99 | 97 | |
100 | 98 | if ( $displayMap ) { |
101 | 99 | // Call the function according to the map service to get the HTML output. |
102 | | - $output = $mapClass->getMapHtml( $parser, $parameters ) . $manager->getErrorList(); |
| 100 | + $output = $mapClass->getMapHtml( $parser, $manager->getParameters( false ) ) . $manager->getErrorList(); |
103 | 101 | } else { |
104 | 102 | // TODO: Get failiures |
105 | 103 | if ( $egValidatorFatalLevel == Validator_ERRORS_WARN ) { |