Index: trunk/extensions/SemanticMediaWiki/RELEASE-NOTES |
— | — | @@ -5,6 +5,7 @@ |
6 | 6 | |
7 | 7 | * Use of native MediaWiki sortable tables for the table formats. |
8 | 8 | * Fixed separator and filename parameters for the DSV format. |
| 9 | +* Fixed display of properties of type URL (bug 30912). |
9 | 10 | * Added definitions for missing params (sort, order, searchlabel) to the base query printer. |
10 | 11 | * Added validation and manipulation of the format paremeter using Validator. |
11 | 12 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php |
— | — | @@ -22,6 +22,26 @@ |
23 | 23 | const CONCEPT_DESC = 2; // query for concept definition |
24 | 24 | |
25 | 25 | /** |
| 26 | + * Takes an array of unprocessed parameters, |
| 27 | + * processes them using Validator, and returns them. |
| 28 | + * |
| 29 | + * Both input and output arrays are |
| 30 | + * param name (string) => param value (mixed) |
| 31 | + * |
| 32 | + * @since 1.6.2 |
| 33 | + * |
| 34 | + * @param array $params |
| 35 | + * |
| 36 | + * @return array |
| 37 | + */ |
| 38 | + public static function getProcessedParams( array $params ) { |
| 39 | + $validator = new Validator(); |
| 40 | + $validator->setParameters( $params, self::getParameters(), false ); |
| 41 | + $validator->validateParameters(); |
| 42 | + return $validator->getParameterValues(); |
| 43 | + } |
| 44 | + |
| 45 | + /** |
26 | 46 | * Parse a query string given in SMW's query language to create |
27 | 47 | * an SMWQuery. Parameters are given as key-value-pairs in the |
28 | 48 | * given array. The parameter $context defines in what context the |
— | — | @@ -32,18 +52,17 @@ |
33 | 53 | * known. Otherwise it will be determined from the parameters when |
34 | 54 | * needed. This parameter is just for optimisation in a common case. |
35 | 55 | * |
| 56 | + * @param string $querystring |
| 57 | + * @param array $params These need to be the result of a list fed to getProcessedParams |
| 58 | + * @param $context |
| 59 | + * @param string $format |
| 60 | + * @param array $extraprintouts |
| 61 | + * |
36 | 62 | * @return SMWQuery |
37 | 63 | */ |
38 | | - static public function createQuery( $querystring, array $params, $context = self::INLINE_QUERY, $format = '', $extraprintouts = array() ) { |
| 64 | + static public function createQuery( $querystring, array $params, $context = self::INLINE_QUERY, $format = '', array $extraprintouts = array() ) { |
39 | 65 | global $smwgQDefaultNamespaces, $smwgQFeatures, $smwgQConceptFeatures; |
40 | 66 | |
41 | | - // TODO: this is a hack |
42 | | - // Idially one round of Validation would be done through Validator on this level |
43 | | - // instead of on query printer level and then have weirdness here. |
44 | | - $formatParam = new SMWParamFormat(); |
45 | | - $p = array(); |
46 | | - $formatParam->doManipulation( $format, new Parameter( 'format' ), $p ); |
47 | | - |
48 | 67 | // parse query: |
49 | 68 | $queryfeatures = ( $context == self::CONCEPT_DESC ) ? $smwgQConceptFeatures : $smwgQFeatures; |
50 | 69 | $qp = new SMWQueryParser( $queryfeatures ); |
— | — | @@ -95,8 +114,13 @@ |
96 | 115 | } |
97 | 116 | |
98 | 117 | // determine sortkeys and ascendings: |
99 | | - if ( array_key_exists( 'order', $params ) ) { |
100 | | - $orders = explode( ',', $params['order'] ); |
| 118 | + if ( array_key_exists( 'order', $params ) && !is_null( $params['order'] ) ) { |
| 119 | + // Compatibility with query printers not using Validator yet |
| 120 | + if ( is_string( $params['order'] ) ) { |
| 121 | + $params['order'] = explode( ',', $params['order'] ); |
| 122 | + } |
| 123 | + |
| 124 | + $orders = $params['order']; |
101 | 125 | |
102 | 126 | foreach ( $orders as $key => $order ) { // normalise |
103 | 127 | $order = strtolower( trim( $order ) ); |
— | — | @@ -114,11 +138,16 @@ |
115 | 139 | |
116 | 140 | reset( $orders ); |
117 | 141 | |
118 | | - if ( array_key_exists( 'sort', $params ) ) { |
| 142 | + if ( array_key_exists( 'sort', $params ) && !is_null( $params['sort'] ) ) { |
| 143 | + // Compatibility with query printers not using Validator yet |
| 144 | + if ( is_string( $params['sort'] ) ) { |
| 145 | + $params['sort'] = explode( ',', $params['sort'] ); |
| 146 | + } |
| 147 | + |
119 | 148 | $query->sort = true; |
120 | 149 | $query->sortkeys = array(); |
121 | 150 | |
122 | | - foreach ( explode( ',', $params['sort'] ) as $sort ) { |
| 151 | + foreach ( $params['sort'] as $sort ) { |
123 | 152 | $propertyValue = SMWPropertyValue::makeUserProperty( trim( $sort ) ); |
124 | 153 | if ( $propertyValue->isValid() ) { |
125 | 154 | $sortkey = $propertyValue->getDataItem()->getKey(); |
— | — | @@ -256,6 +285,7 @@ |
257 | 286 | */ |
258 | 287 | static public function getResultFromFunctionParams( array $rawparams, $outputmode, $context = self::INLINE_QUERY, $showmode = false ) { |
259 | 288 | self::processFunctionParams( $rawparams, $querystring, $params, $printouts, $showmode ); |
| 289 | + $params = self::getProcessedParams( $params ); |
260 | 290 | return self::getResultFromQueryString( $querystring, $params, $printouts, SMW_OUTPUT_WIKI, $context ); |
261 | 291 | } |
262 | 292 | |
— | — | @@ -266,11 +296,17 @@ |
267 | 297 | * parameter $context defines in what context the query is used, which affects |
268 | 298 | * certain general settings. Finally, $extraprintouts supplies additional |
269 | 299 | * printout requests for the query results. |
| 300 | + * |
| 301 | + * @param string $querystring |
| 302 | + * @param array $params These need to be the result of a list fed to getProcessedParams |
| 303 | + * @param $extraprintouts |
| 304 | + * @param $outputmode |
| 305 | + * @param $context |
270 | 306 | */ |
271 | 307 | static public function getResultFromQueryString( $querystring, array $params, $extraprintouts, $outputmode, $context = self::INLINE_QUERY ) { |
272 | 308 | wfProfileIn( 'SMWQueryProcessor::getResultFromQueryString (SMW)' ); |
273 | 309 | |
274 | | - $format = array_key_exists( 'format', $params ) ? $params['format'] : ''; |
| 310 | + $format = $params['format']; // This is rather silly to do now... |
275 | 311 | $query = self::createQuery( $querystring, $params, $context, $format, $extraprintouts ); |
276 | 312 | $result = self::getResultFromQuery( $query, $params, $extraprintouts, $outputmode, $context, $format ); |
277 | 313 | |
— | — | @@ -279,15 +315,22 @@ |
280 | 316 | return $result; |
281 | 317 | } |
282 | 318 | |
| 319 | + /** |
| 320 | + * TODO: document |
| 321 | + * |
| 322 | + * @param SMWQuery $query |
| 323 | + * @param array $params These need to be the result of a list fed to getProcessedParams |
| 324 | + * @param $extraprintouts |
| 325 | + * @param $outputmode |
| 326 | + * @param $context |
| 327 | + * @param $format |
| 328 | + * |
| 329 | + * @return string |
| 330 | + */ |
283 | 331 | static public function getResultFromQuery( SMWQuery $query, array $params, $extraprintouts, $outputmode, $context = self::INLINE_QUERY, $format = '' ) { |
284 | 332 | wfProfileIn( 'SMWQueryProcessor::getResultFromQuery (SMW)' ); |
285 | 333 | |
286 | | - // TODO: this is a hack |
287 | | - // Idially one round of Validation would be done through Validator on this level |
288 | | - // instead of on query printer level and then have weirdness here. |
289 | | - $formatParam = new SMWParamFormat(); |
290 | | - $p = array(); |
291 | | - $formatParam->doManipulation( $format, new Parameter( 'format' ), $p ); |
| 334 | + //$params = self::getProcessedParams( $params ); |
292 | 335 | |
293 | 336 | // Query routing allows extensions to provide alternative stores as data sources |
294 | 337 | // The while feature is experimental and is not properly integrated with most of SMW's architecture. For instance, some query printers just fetch their own store. |
— | — | @@ -356,5 +399,97 @@ |
357 | 400 | |
358 | 401 | return new $formatClass( $format, ( $context != self::SPECIAL_PAGE ) ); |
359 | 402 | } |
| 403 | + |
| 404 | + /** |
| 405 | + * Determines the format from an array of parameters, and returns it. |
| 406 | + * |
| 407 | + * @deprecated since 1.6.2, removal in 1.8 |
| 408 | + * |
| 409 | + * @param array $params |
| 410 | + * |
| 411 | + * @return string |
| 412 | + */ |
| 413 | + static protected function getResultFormat( array $params ) { |
| 414 | + $format = 'auto'; |
360 | 415 | |
| 416 | + if ( array_key_exists( 'format', $params ) ) { |
| 417 | + global $smwgResultFormats; |
| 418 | + |
| 419 | + $format = strtolower( trim( $params['format'] ) ); |
| 420 | + |
| 421 | + if ( !array_key_exists( $format, $smwgResultFormats ) ) { |
| 422 | + $isAlias = SMWParamFormat::resolveFormatAliases( $format ); |
| 423 | + if ( !$isAlias ) { |
| 424 | + $format = 'auto'; // If it is an unknown format, defaults to list/table again |
| 425 | + } |
| 426 | + } |
| 427 | + } |
| 428 | + |
| 429 | + return $format; |
| 430 | + } |
| 431 | + |
| 432 | + /** |
| 433 | + * A function to describe the allowed parameters of a query using |
| 434 | + * any specific format - most query printers should override this |
| 435 | + * function. |
| 436 | + * |
| 437 | + * TODO: refactor non-printer params up to the query processor |
| 438 | + * and do all param handling there. |
| 439 | + * |
| 440 | + * @since 1.6.2 |
| 441 | + * |
| 442 | + * @return array |
| 443 | + */ |
| 444 | + public static function getParameters() { |
| 445 | + $params = array(); |
| 446 | + |
| 447 | + $allowedFormats = $GLOBALS['smwgResultFormats']; |
| 448 | + |
| 449 | + foreach ( $GLOBALS['smwgResultAliases'] as $aliases ) { |
| 450 | + $allowedFormats += $aliases; |
| 451 | + } |
| 452 | + |
| 453 | + $params['format'] = new Parameter( 'format' ); |
| 454 | + $params['format']->setDefault( 'auto' ); |
| 455 | + //$params['format']->addCriteria( new CriterionInArray( $allowedFormats ) ); |
| 456 | + $params['format']->addManipulations( new SMWParamFormat() ); |
| 457 | + |
| 458 | + $params['limit'] = new Parameter( 'limit', Parameter::TYPE_INTEGER ); |
| 459 | + $params['limit']->setMessage( 'smw_paramdesc_limit' ); |
| 460 | + $params['limit']->setDefault( 20 ); |
| 461 | + |
| 462 | + $params['sort'] = new ListParameter( 'sort' ); |
| 463 | + $params['sort']->setMessage( 'smw-paramdesc-sort' ); |
| 464 | + $params['sort']->setDefault( array() ); |
| 465 | + |
| 466 | + $params['order'] = new ListParameter( 'order' ); |
| 467 | + $params['order']->setMessage( 'smw-paramdesc-order' ); |
| 468 | + $params['order']->setDefault( array() ); |
| 469 | + $params['order']->addCriteria( new CriterionInArray( 'descending', 'desc', 'asc', 'ascending', 'rand', 'random' ) ); |
| 470 | + |
| 471 | + $params['offset'] = new Parameter( 'offset', Parameter::TYPE_INTEGER ); |
| 472 | + $params['offset']->setMessage( 'smw_paramdesc_offset' ); |
| 473 | + $params['offset']->setDefault( 0 ); |
| 474 | + |
| 475 | + $params['headers'] = new Parameter( 'headers' ); |
| 476 | + $params['headers']->setMessage( 'smw_paramdesc_headers' ); |
| 477 | + $params['headers']->addCriteria( new CriterionInArray( 'show', 'hide', 'plain' ) ); |
| 478 | + $params['headers']->setDefault( 'show' ); |
| 479 | + |
| 480 | + $params['mainlabel'] = new Parameter( 'mainlabel' ); |
| 481 | + $params['mainlabel']->setMessage( 'smw_paramdesc_mainlabel' ); |
| 482 | + $params['mainlabel']->setDefault( false, false ); |
| 483 | + |
| 484 | + $params['link'] = new Parameter( 'link' ); |
| 485 | + $params['link']->setMessage( 'smw_paramdesc_link' ); |
| 486 | + $params['link']->addCriteria( new CriterionInArray( 'all', 'subject', 'none' ) ); |
| 487 | + $params['link']->setDefault( 'all' ); |
| 488 | + |
| 489 | + $params['searchlabel'] = new Parameter( 'searchlabel' ); |
| 490 | + $params['searchlabel']->setDefault( '' ); |
| 491 | + $params['searchlabel']->setMessage( 'smw-paramdesc-searchlabel' ); |
| 492 | + |
| 493 | + return $params; |
| 494 | + } |
| 495 | + |
361 | 496 | } |
\ No newline at end of file |
Index: trunk/extensions/SemanticMediaWiki/includes/params/SMW_ParamFormat.php |
— | — | @@ -26,9 +26,29 @@ |
27 | 27 | /** |
28 | 28 | * @see ItemParameterManipulation::doManipulation |
29 | 29 | * |
30 | | - * @since 0.7 |
| 30 | + * @since 1.6.2 |
31 | 31 | */ |
32 | 32 | public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
| 33 | + // Make sure the format value is valid. |
| 34 | + $value = self::getValidFormatName( $value ); |
| 35 | + |
| 36 | + // Add the formats parameters to the parameter list. |
| 37 | + $queryPrinter = SMWQueryProcessor::getResultPrinter( $value ); |
| 38 | + $parameters = array_merge( $parameters, $queryPrinter->getValidatorParameters() ); |
| 39 | + } |
| 40 | + |
| 41 | + /** |
| 42 | + * Takes a format name, which can be an alias and returns something |
| 43 | + * that certainly valid. Aliases are resvolved. Invalid formats |
| 44 | + * will result into 'auto' being returned. |
| 45 | + * |
| 46 | + * @since 1.6.2 |
| 47 | + * |
| 48 | + * @param string $value |
| 49 | + * |
| 50 | + * @return string |
| 51 | + */ |
| 52 | + protected function getValidFormatName( $value ) { |
33 | 53 | global $smwgResultFormats; |
34 | 54 | |
35 | 55 | $value = trim( $value ); |
— | — | @@ -40,16 +60,20 @@ |
41 | 61 | $value = 'auto'; // If it is an unknown format, defaults to list/table again |
42 | 62 | } |
43 | 63 | } |
| 64 | + |
| 65 | + return $value; |
44 | 66 | } |
45 | 67 | |
46 | 68 | /** |
47 | 69 | * Turns format aliases into main formats. |
48 | 70 | * |
| 71 | + * @since 1.6.2 |
| 72 | + * |
49 | 73 | * @param string $format |
50 | 74 | * |
51 | 75 | * @return boolean Indicates if the passed format was an alias, and thus was changed. |
52 | 76 | */ |
53 | | - static protected function resolveFormatAliases( &$format ) { |
| 77 | + public static function resolveFormatAliases( &$format ) { |
54 | 78 | global $smwgResultAliases; |
55 | 79 | |
56 | 80 | $isAlias = false; |
Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Auto.php |
— | — | @@ -66,5 +66,16 @@ |
67 | 67 | smwfLoadExtensionMessages( 'SemanticMediaWiki' ); |
68 | 68 | return wfMsg( 'smw_printername_auto' ); |
69 | 69 | } |
| 70 | + |
| 71 | + public function getParameters() { |
| 72 | + // TODO: this assumes table, which is not correct when it should be list |
| 73 | + |
| 74 | + $printer = SMWQueryProcessor::getResultPrinter( |
| 75 | + 'table', |
| 76 | + $this->mInline ? SMWQueryProcessor::INLINE_QUERY : SMWQueryProcessor::SPECIAL_PAGE |
| 77 | + ); |
| 78 | + |
| 79 | + return $printer->getParameters(); |
| 80 | + } |
70 | 81 | |
71 | 82 | } |
Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QueryPrinter.php |
— | — | @@ -158,15 +158,7 @@ |
159 | 159 | $this->hasTemplates = false; |
160 | 160 | |
161 | 161 | if ( $this->useValidator ) { |
162 | | - $paramValidationResult = $this->handleRawParameters( $params ); |
163 | | - |
164 | | - if ( is_array( $paramValidationResult ) ) { |
165 | | - $this->handleParameters( $paramValidationResult, $outputmode ); |
166 | | - } |
167 | | - else { |
168 | | - $this->addError( $paramValidationResult ); |
169 | | - return $this->getErrorString( $results ); |
170 | | - } |
| 162 | + $this->handleParameters( $params, $outputmode ); |
171 | 163 | } |
172 | 164 | else { |
173 | 165 | $this->readParameters( $params, $outputmode ); |
— | — | @@ -291,31 +283,6 @@ |
292 | 284 | |
293 | 285 | return $result; |
294 | 286 | } |
295 | | - |
296 | | - /** |
297 | | - * Handles the user-provided parameters and returns the processes key-value pairs. |
298 | | - * If there is a fatal error, a string with the error message will be returned intsead. |
299 | | - * |
300 | | - * @since 1.6 |
301 | | - * |
302 | | - * @param array $keyValuePairs |
303 | | - * |
304 | | - * @return array or string |
305 | | - */ |
306 | | - protected function handleRawParameters( array $keyValuePairs ) { |
307 | | - $validator = new Validator(); |
308 | | - $validator->setParameters( $keyValuePairs, $this->getParameters() ); |
309 | | - $validator->validateParameters(); |
310 | | - $fatalError = $validator->hasFatalError(); |
311 | | - |
312 | | - if ( $fatalError === false ) { |
313 | | - $this->mErrors = $validator->getErrorMessages(); |
314 | | - return $validator->getParameterValues(); |
315 | | - } |
316 | | - else { |
317 | | - return $fatalError->getMessage(); |
318 | | - } |
319 | | - } |
320 | 287 | |
321 | 288 | /** |
322 | 289 | * Read an array of parameter values given as key-value-pairs and |
— | — | @@ -613,77 +580,14 @@ |
614 | 581 | $params = array(); |
615 | 582 | |
616 | 583 | foreach ( $this->getParameters() as $param ) { |
617 | | - $params[] = $this->toValidatorParam( $param ); |
| 584 | + $param = $this->toValidatorParam( $param ); |
| 585 | + $params[$param->getName()] = $param; |
618 | 586 | } |
619 | 587 | |
620 | 588 | return $params; |
621 | 589 | } |
622 | 590 | |
623 | 591 | /** |
624 | | - * A function to describe the allowed parameters of a query using |
625 | | - * any specific format - most query printers should override this |
626 | | - * function. |
627 | | - * |
628 | | - * TODO: refactor non-printer params up to the query processor |
629 | | - * and do all param handling there. |
630 | | - * |
631 | | - * @since 1.5.0 |
632 | | - * |
633 | | - * @return array |
634 | | - */ |
635 | | - public function getParameters() { |
636 | | - $params = array(); |
637 | | - |
638 | | - $allowedFormats = $GLOBALS['smwgResultFormats']; |
639 | | - |
640 | | - foreach ( $GLOBALS['smwgResultAliases'] as $aliases ) { |
641 | | - $allowedFormats += $aliases; |
642 | | - } |
643 | | - |
644 | | - $params['format'] = new Parameter( 'format' ); |
645 | | - $params['format']->setDefault( 'auto' ); |
646 | | - //$params['format']->addCriteria( new CriterionInArray( $allowedFormats ) ); |
647 | | - $params['format']->addManipulations( new SMWParamFormat() ); |
648 | | - |
649 | | - $params['limit'] = new Parameter( 'limit', Parameter::TYPE_INTEGER ); |
650 | | - $params['limit']->setMessage( 'smw_paramdesc_limit' ); |
651 | | - $params['limit']->setDefault( 20 ); |
652 | | - |
653 | | - $params['sort'] = new ListParameter( 'sort' ); |
654 | | - $params['sort']->setMessage( 'smw-paramdesc-sort' ); |
655 | | - $params['sort']->setDefault( '' ); |
656 | | - |
657 | | - $params['order'] = new ListParameter( 'order' ); |
658 | | - $params['order']->setMessage( 'smw-paramdesc-order' ); |
659 | | - $params['order']->setDefault( '' ); |
660 | | - $params['order']->addCriteria( new CriterionInArray( 'descending', 'desc', 'asc', 'ascending', 'rand', 'random' ) ); |
661 | | - |
662 | | - $params['offset'] = new Parameter( 'offset', Parameter::TYPE_INTEGER ); |
663 | | - $params['offset']->setMessage( 'smw_paramdesc_offset' ); |
664 | | - $params['offset']->setDefault( 0 ); |
665 | | - |
666 | | - $params['headers'] = new Parameter( 'headers' ); |
667 | | - $params['headers']->setMessage( 'smw_paramdesc_headers' ); |
668 | | - $params['headers']->addCriteria( new CriterionInArray( 'show', 'hide', 'plain' ) ); |
669 | | - $params['headers']->setDefault( 'show' ); |
670 | | - |
671 | | - $params['mainlabel'] = new Parameter( 'mainlabel' ); |
672 | | - $params['mainlabel']->setMessage( 'smw_paramdesc_mainlabel' ); |
673 | | - $params['mainlabel']->setDefault( false, false ); |
674 | | - |
675 | | - $params['link'] = new Parameter( 'link' ); |
676 | | - $params['link']->setMessage( 'smw_paramdesc_link' ); |
677 | | - $params['link']->addCriteria( new CriterionInArray( 'all', 'subject', 'none' ) ); |
678 | | - $params['link']->setDefault( 'all' ); |
679 | | - |
680 | | - $params['searchlabel'] = new Parameter( 'searchlabel' ); |
681 | | - $params['searchlabel']->setDefault( '' ); |
682 | | - $params['searchlabel']->setMessage( 'smw-paramdesc-searchlabel' ); |
683 | | - |
684 | | - return $params; |
685 | | - } |
686 | | - |
687 | | - /** |
688 | 592 | * Returns a Validator style Parameter definition. |
689 | 593 | * SMW 1.5.x style definitions are converted. |
690 | 594 | * |
— | — | @@ -722,5 +626,21 @@ |
723 | 627 | return $param; |
724 | 628 | } |
725 | 629 | } |
| 630 | + |
| 631 | + /** |
| 632 | + * A function to describe the allowed parameters of a query using |
| 633 | + * any specific format - most query printers should override this |
| 634 | + * function. |
| 635 | + * |
| 636 | + * TODO: refactor non-printer params up to the query processor |
| 637 | + * and do all param handling there. |
| 638 | + * |
| 639 | + * @since 1.5 |
| 640 | + * |
| 641 | + * @return array |
| 642 | + */ |
| 643 | + public function getParameters() { |
| 644 | + return array(); |
| 645 | + } |
726 | 646 | |
727 | 647 | } |
Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Concept.php |
— | — | @@ -54,7 +54,12 @@ |
55 | 55 | $concept_docu = array_shift( $params ); |
56 | 56 | |
57 | 57 | // NOTE: the str_replace above is required in MediaWiki 1.11, but not in MediaWiki 1.14 |
58 | | - $query = SMWQueryProcessor::createQuery( $concept_input, array( 'limit' => 20, 'format' => 'list' ), SMWQueryProcessor::CONCEPT_DESC ); |
| 58 | + $query = SMWQueryProcessor::createQuery( |
| 59 | + $concept_input, |
| 60 | + SMWQueryProcessor::getProcessedParams( array( 'limit' => 20, 'format' => 'list' ) ), |
| 61 | + SMWQueryProcessor::CONCEPT_DESC |
| 62 | + ); |
| 63 | + |
59 | 64 | $concept_text = $query->getDescription()->getQueryString(); |
60 | 65 | |
61 | 66 | if ( SMWParseData::getSMWData( $parser ) !== null ) { |
Index: trunk/extensions/SemanticMediaWiki/includes/api/ApiSMWQuery.php |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | */ |
38 | 38 | protected function getQuery( $queryString ) { |
39 | 39 | // SMWQueryProcessor::processFunctionParams( $rawparams, $queryString, $m_params, $m_printouts); |
40 | | - return SMWQueryProcessor::createQuery( $queryString, $this->parameters, SMWQueryProcessor::SPECIAL_PAGE ); |
| 40 | + return SMWQueryProcessor::createQuery( $queryString, SMWQueryProcessor::getProcessedParams( $this->parameters ), SMWQueryProcessor::SPECIAL_PAGE ); |
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |