Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QueryPrinter.php |
— | — | @@ -96,8 +96,6 @@ |
97 | 97 | /// This can be set in LocalSettings.php, but only after enableSemantics(). |
98 | 98 | public static $maxRecursionDepth = 2; |
99 | 99 | |
100 | | - protected $useValidator; |
101 | | - |
102 | 100 | /** |
103 | 101 | * Return serialised results in specified format. |
104 | 102 | * Implemented by subclasses. |
— | — | @@ -110,16 +108,16 @@ |
111 | 109 | * |
112 | 110 | * @param string $format |
113 | 111 | * @param $inline |
114 | | - * @param boolean $useValidator Since 1.6 |
| 112 | + * @param boolean $useValidator Depracted since 1.6.2 |
115 | 113 | */ |
116 | 114 | public function __construct( $format, $inline, $useValidator = false ) { |
117 | 115 | global $smwgQDefaultLinking; |
| 116 | + |
118 | 117 | $this->mFormat = $format; |
119 | 118 | $this->mInline = $inline; |
120 | 119 | $this->mLinkFirst = ( $smwgQDefaultLinking != 'none' ); |
121 | 120 | $this->mLinkOthers = ( $smwgQDefaultLinking == 'all' ); |
122 | 121 | $this->mLinker = class_exists( 'DummyLinker' ) ? new DummyLinker : new Linker; ///TODO: how can we get the default or user skin here (depending on context)? |
123 | | - $this->useValidator = $useValidator; |
124 | 122 | } |
125 | 123 | |
126 | 124 | /** |
— | — | @@ -157,12 +155,7 @@ |
158 | 156 | $this->isHTML = false; |
159 | 157 | $this->hasTemplates = false; |
160 | 158 | |
161 | | - if ( $this->useValidator ) { |
162 | | - $this->handleParameters( $params, $outputmode ); |
163 | | - } |
164 | | - else { |
165 | | - $this->readParameters( $params, $outputmode ); |
166 | | - } |
| 159 | + $this->handleParameters( $params, $outputmode ); |
167 | 160 | |
168 | 161 | // Default output for normal printers: |
169 | 162 | if ( ( $outputmode != SMW_OUTPUT_FILE ) && // not in FILE context, |
— | — | @@ -329,64 +322,7 @@ |
330 | 323 | $this->mShowHeaders = SMW_HEADERS_SHOW; |
331 | 324 | } |
332 | 325 | } |
333 | | - |
334 | | - /** |
335 | | - * Read an array of parameter values given as key-value-pairs and |
336 | | - * initialise internal member fields accordingly. Possibly overwritten |
337 | | - * (extended) by subclasses. |
338 | | - * |
339 | | - * @param array $params |
340 | | - * @param $outputmode |
341 | | - * |
342 | | - * @deprecated Use handleParameters instead |
343 | | - */ |
344 | | - protected function readParameters( $params, $outputmode ) { |
345 | | - $this->m_params = $params; |
346 | 326 | |
347 | | - if ( array_key_exists( 'intro', $params ) ) { |
348 | | - $this->mIntro = $params['intro']; |
349 | | - } |
350 | | - |
351 | | - if ( array_key_exists( 'outro', $params ) ) { |
352 | | - $this->mOutro = $params['outro']; |
353 | | - } |
354 | | - |
355 | | - if ( array_key_exists( 'searchlabel', $params ) ) { |
356 | | - $this->mSearchlabel = $params['searchlabel']; |
357 | | - } |
358 | | - |
359 | | - if ( array_key_exists( 'link', $params ) ) { |
360 | | - switch ( strtolower( trim( $params['link'] ) ) ) { |
361 | | - case 'head': case 'subject': |
362 | | - $this->mLinkFirst = true; |
363 | | - $this->mLinkOthers = false; |
364 | | - break; |
365 | | - case 'all': |
366 | | - $this->mLinkFirst = true; |
367 | | - $this->mLinkOthers = true; |
368 | | - break; |
369 | | - case 'none': |
370 | | - $this->mLinkFirst = false; |
371 | | - $this->mLinkOthers = false; |
372 | | - break; |
373 | | - } |
374 | | - } |
375 | | - |
376 | | - if ( array_key_exists( 'default', $params ) ) { |
377 | | - $this->mDefault = str_replace( '_', ' ', $params['default'] ); |
378 | | - } |
379 | | - |
380 | | - if ( array_key_exists( 'headers', $params ) ) { |
381 | | - if ( strtolower( trim( $params['headers'] ) ) == 'hide' ) { |
382 | | - $this->mShowHeaders = SMW_HEADERS_HIDE; |
383 | | - } elseif ( strtolower( trim( $params['headers'] ) ) == 'plain' ) { |
384 | | - $this->mShowHeaders = SMW_HEADERS_PLAIN; |
385 | | - } else { |
386 | | - $this->mShowHeaders = SMW_HEADERS_SHOW; |
387 | | - } |
388 | | - } |
389 | | - } |
390 | | - |
391 | 327 | /** |
392 | 328 | * Depending on current linking settings, returns a linker object |
393 | 329 | * for making hyperlinks or NULL if no links should be created. |