Index: trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_QueryPrinters.php |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | 'limit' => array( |
113 | 113 | 'type' => 'integer', |
114 | 114 | 'criteria' => array( |
115 | | - 'in_range' => array( 0 ) |
| 115 | + 'in_range' => array( 0, false ) |
116 | 116 | ) |
117 | 117 | ), |
118 | 118 | 'offset' => array( |
Index: trunk/extensions/SemanticMaps/Features/QueryPrinters/SM_MapPrinter.php |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | /** |
5 | | - * File holding abstract class SMMapPrinter. |
| 5 | + * Abstract class that provides the common functionality for all map query printers. |
6 | 6 | * |
7 | 7 | * @file SM_MapPrinter.php |
8 | 8 | * @ingroup SemanticMaps |
— | — | @@ -10,22 +10,6 @@ |
11 | 11 | * @author Robert Buzink |
12 | 12 | * @author Yaron Koren |
13 | 13 | */ |
14 | | - |
15 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
16 | | - die( 'Not an entry point.' ); |
17 | | -} |
18 | | - |
19 | | -/** |
20 | | - * Abstract class that provides the common functionality for all map query printers. |
21 | | - * |
22 | | - * @ingroup SemanticMaps |
23 | | - * |
24 | | - * @author Jeroen De Dauw |
25 | | - * @author Robert Buzink |
26 | | - * @author Yaron Koren |
27 | | - * |
28 | | - * The adaptor pattern could be used to prevent this. |
29 | | - */ |
30 | 14 | abstract class SMMapPrinter extends SMWResultPrinter implements iMappingFeature { |
31 | 15 | |
32 | 16 | /** |
— | — | @@ -66,11 +50,6 @@ |
67 | 51 | * @var string |
68 | 52 | */ |
69 | 53 | protected $output = ''; |
70 | | - |
71 | | - /** |
72 | | - * @var string |
73 | | - */ |
74 | | - protected $errorList; |
75 | 54 | |
76 | 55 | /** |
77 | 56 | * @var array |
— | — | @@ -161,7 +140,7 @@ |
162 | 141 | } |
163 | 142 | } |
164 | 143 | |
165 | | - return array( $this->output . $this->errorList, 'noparse' => true, 'isHTML' => true ); |
| 144 | + return array( $this->output, 'noparse' => true, 'isHTML' => true ); |
166 | 145 | } |
167 | 146 | |
168 | 147 | /** |
— | — | @@ -184,16 +163,19 @@ |
185 | 164 | $parameterInfo = array_merge_recursive( $parameterInfo, $this->service->getParameterInfo() ); |
186 | 165 | $parameterInfo = array_merge_recursive( $parameterInfo, $this->getSpecificParameterInfo() ); |
187 | 166 | |
188 | | - $manager = new ValidationManager(); |
| 167 | + $this->validator = new Validator( $this->getName() ); |
189 | 168 | |
190 | | - $showMap = $manager->manageParsedParameters( $mapProperties, $parameterInfo ); |
| 169 | + $this->validator->setParameters( $mapProperties, $parameterInfo ); |
191 | 170 | |
| 171 | + $this->validator->validateParameters(); |
| 172 | + |
| 173 | + $showMap = $this->validator->hasFatalError(); |
| 174 | + |
192 | 175 | if ( $showMap ) { |
193 | | - $this->setMapProperties( $manager->getParameters( false ) ); |
| 176 | + $this->validator->formatParameters(); |
| 177 | + $this->setMapProperties( $this->validator->getParameterValues() ); |
194 | 178 | } |
195 | 179 | |
196 | | - $this->errorList = $manager->getErrorList(); |
197 | | - |
198 | 180 | return $showMap; |
199 | 181 | } |
200 | 182 | |