Index: trunk/extensions/SemanticMaps/Features/FormInputs/SM_FormInput.php |
— | — | @@ -43,11 +43,6 @@ |
44 | 44 | protected $markerCoords; |
45 | 45 | |
46 | 46 | /** |
47 | | - * @var string |
48 | | - */ |
49 | | - protected $errorList; |
50 | | - |
51 | | - /** |
52 | 47 | * Parameters specific to this feature. |
53 | 48 | * |
54 | 49 | * @var mixed |
— | — | @@ -117,12 +112,16 @@ |
118 | 113 | $parameterInfo = array_merge_recursive( $parameterInfo, $this->service->getParameterInfo() ); |
119 | 114 | $parameterInfo = array_merge_recursive( $parameterInfo, $this->getSpecificParameterInfo() ); |
120 | 115 | |
121 | | - $manager = new ValidationManager(); |
122 | | - |
123 | | - $showMap = $manager->manageParsedParameters( $mapProperties, $parameterInfo ); |
| 116 | + $validator = new Validator( 'form' ); // TODO |
124 | 117 | |
| 118 | + $validator->setParameters( $mapProperties, $parameterInfo ); |
| 119 | + |
| 120 | + $validator->validateParameters(); |
| 121 | + |
| 122 | + $showMap = $validator->hasFatalError(); |
| 123 | + |
125 | 124 | if ( $showMap ) { |
126 | | - $parameters = $manager->getParameters( false ); |
| 125 | + $parameters = $validator->getParameterValues(); |
127 | 126 | |
128 | 127 | foreach ( $parameters as $paramName => $paramValue ) { |
129 | 128 | if ( !property_exists( __CLASS__, $paramName ) ) { |
— | — | @@ -135,8 +134,6 @@ |
136 | 135 | } |
137 | 136 | } |
138 | 137 | |
139 | | - $this->errorList = $manager->getErrorList(); |
140 | | - |
141 | 138 | return $showMap; |
142 | 139 | } |
143 | 140 | |
— | — | @@ -156,7 +153,7 @@ |
157 | 154 | $showInput = $this->setMapProperties( $field_args ); |
158 | 155 | |
159 | 156 | if ( !$showInput ) { |
160 | | - return array( $this->errorList ); |
| 157 | + return array( '' ); |
161 | 158 | } |
162 | 159 | |
163 | 160 | $this->setCoordinates(); |
Index: trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php |
— | — | @@ -163,17 +163,17 @@ |
164 | 164 | $parameterInfo = array_merge_recursive( $parameterInfo, $this->service->getParameterInfo() ); |
165 | 165 | $parameterInfo = array_merge_recursive( $parameterInfo, $this->getSpecificParameterInfo() ); |
166 | 166 | |
167 | | - $this->validator = new Validator( $this->getName() ); |
| 167 | + $validator = new Validator( $this->getName() ); |
168 | 168 | |
169 | | - $this->validator->setParameters( $mapProperties, $parameterInfo ); |
| 169 | + $validator->setParameters( $mapProperties, $parameterInfo ); |
170 | 170 | |
171 | | - $this->validator->validateParameters(); |
| 171 | + $validator->validateParameters(); |
172 | 172 | |
173 | | - $showMap = $this->validator->hasFatalError(); |
| 173 | + $showMap = $validator->hasFatalError(); |
174 | 174 | |
175 | 175 | if ( $showMap ) { |
176 | | - $this->validator->formatParameters(); |
177 | | - $this->setMapProperties( $this->validator->getParameterValues() ); |
| 176 | + $validator->formatParameters(); |
| 177 | + $this->setMapProperties( $validator->getParameterValues() ); |
178 | 178 | } |
179 | 179 | |
180 | 180 | return $showMap; |