Index: trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php |
— | — | @@ -165,41 +165,27 @@ |
166 | 166 | |
167 | 167 | $validator = new Validator( $this->getName() ); |
168 | 168 | |
169 | | - /* TODO: filter these! |
170 | | - // SMW #Ask: parameters |
171 | | - 'limit' => array( |
172 | | - 'type' => 'integer', |
173 | | - 'criteria' => array( |
174 | | - 'in_range' => array( 0, false ) |
175 | | - ) |
176 | | - ), |
177 | | - 'offset' => array( |
178 | | - 'type' => 'integer' |
179 | | - ), |
180 | | - 'sort' => array(), |
181 | | - 'order' => array( |
182 | | - 'criteria' => array( |
183 | | - 'in_array' => array( 'ascending', 'asc', 'descending', 'desc', 'reverse' ) |
184 | | - ) |
185 | | - ), |
186 | | - 'headers' => array( |
187 | | - 'criteria' => array( |
188 | | - 'in_array' => array( 'show', 'hide' ) |
189 | | - ) |
190 | | - ), |
191 | | - 'mainlabel' => array(), |
192 | | - 'link' => array( |
193 | | - 'criteria' => array( |
194 | | - 'in_array' => array( 'none', 'subject', 'all' ) |
195 | | - ) |
196 | | - ), |
197 | | - 'default' => array(), |
198 | | - 'intro' => array(), |
199 | | - 'outro' => array(), |
200 | | - 'searchlabel' => array(), |
201 | | - 'distance' => array(), |
202 | | - */ |
| 169 | + $paramsToFilter = array( |
| 170 | + 'limit', |
| 171 | + 'offset', |
| 172 | + 'sort', |
| 173 | + 'order', |
| 174 | + 'headers', |
| 175 | + 'mainlabel', |
| 176 | + 'link', |
| 177 | + 'default', |
| 178 | + 'intro', |
| 179 | + 'outro', |
| 180 | + 'searchlabel', |
| 181 | + 'distance' |
| 182 | + ); |
203 | 183 | |
| 184 | + foreach ( $paramsToFilter as $paramName ) { |
| 185 | + if ( aray_key_exists( $paramName, $mapProperties ) ) { |
| 186 | + unset( $mapProperties[$paramName] ); |
| 187 | + } |
| 188 | + } |
| 189 | + |
204 | 190 | $validator->setParameters( $mapProperties, $parameterInfo ); |
205 | 191 | |
206 | 192 | $validator->validateParameters(); |