Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialAsk.php |
— | — | @@ -370,7 +370,17 @@ |
371 | 371 | if ( array_key_exists( 'order', $this->m_params ) ) $urlArgs['order'] = $this->m_params['order']; |
372 | 372 | |
373 | 373 | if ( $this->m_querystring != '' ) { |
374 | | - $queryobj = SMWQueryProcessor::createQuery( $this->m_querystring, $this->m_params, SMWQueryProcessor::SPECIAL_PAGE , $this->m_params['format'], $this->m_printouts ); |
| 374 | + $params = SMWQueryProcessor::getProcessedParams( $this->m_params ); |
| 375 | + $this->m_params['format'] = $params['format']; |
| 376 | + |
| 377 | + $queryobj = SMWQueryProcessor::createQuery( |
| 378 | + $this->m_querystring, |
| 379 | + $params, |
| 380 | + SMWQueryProcessor::SPECIAL_PAGE , |
| 381 | + $this->m_params['format'], |
| 382 | + $this->m_printouts |
| 383 | + ); |
| 384 | + |
375 | 385 | $res = smwfGetStore()->getQueryResult( $queryobj ); |
376 | 386 | |
377 | 387 | // Try to be smart for rss/ical if no description/title is given and we have a concept query: |
— | — | @@ -423,7 +433,7 @@ |
424 | 434 | |
425 | 435 | $navigation = $this->getNavigationBar( $res, $urlArgs ); |
426 | 436 | $result .= '<div style="text-align: center;">' . "\n" . $navigation . "\n</div>\n"; |
427 | | - $query_result = $printer->getResult( $res, $this->m_params, SMW_OUTPUT_HTML ); |
| 437 | + $query_result = $printer->getResult( $res, $params, SMW_OUTPUT_HTML ); |
428 | 438 | |
429 | 439 | if ( is_array( $query_result ) ) { |
430 | 440 | $result .= $query_result[0]; |
— | — | @@ -436,7 +446,7 @@ |
437 | 447 | $result = '<div style="text-align: center;">' . wfMsgHtml( 'smw_result_noresults' ) . '</div>'; |
438 | 448 | } |
439 | 449 | } else { // make a stand-alone file |
440 | | - $result = $printer->getResult( $res, $this->m_params, SMW_OUTPUT_FILE ); |
| 450 | + $result = $printer->getResult( $res, $params, SMW_OUTPUT_FILE ); |
441 | 451 | $result_name = $printer->getFileName( $res ); // only fetch that after initialising the parameters |
442 | 452 | } |
443 | 453 | } |
— | — | @@ -498,8 +508,8 @@ |
499 | 509 | if ( ! array_key_exists( 'sort', $this->m_params ) || ! array_key_exists( 'order', $this->m_params ) ) { |
500 | 510 | $orders = array(); // do not even show one sort input here |
501 | 511 | } else { |
502 | | - $sorts = explode( ',', $this->m_params['sort'] ); |
503 | | - $orders = explode( ',', $this->m_params['order'] ); |
| 512 | + $sorts = $this->m_params['sort']; |
| 513 | + $orders = $this->m_params['order']; |
504 | 514 | reset( $sorts ); |
505 | 515 | } |
506 | 516 | |
— | — | @@ -725,8 +735,12 @@ |
726 | 736 | protected function showFormatOptions( $format, array $paramValues ) { |
727 | 737 | $printer = SMWQueryProcessor::getResultPrinter( $format, SMWQueryProcessor::SPECIAL_PAGE ); |
728 | 738 | |
729 | | - $params = method_exists( $printer, 'getValidatorParameters' ) ? $printer->getValidatorParameters() : array(); |
| 739 | + $params = SMWQueryProcessor::getParameters(); |
730 | 740 | |
| 741 | + if ( method_exists( $printer, 'getValidatorParameters' ) ) { |
| 742 | + $params = array_merge( $params, $printer->getValidatorParameters() ); |
| 743 | + } |
| 744 | + |
731 | 745 | $optionsHtml = array(); |
732 | 746 | |
733 | 747 | foreach ( $params as $param ) { |
Index: trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_WikiPage.php |
— | — | @@ -145,7 +145,7 @@ |
146 | 146 | |
147 | 147 | public function getShortHTMLText( $linker = null ) { |
148 | 148 | if ( ( $linker !== null ) && ( $this->m_caption !== '' ) && ( $this->m_outformat != '-' ) ) $this->getTitle(); // init the Title object, may reveal hitherto unnoticed errors |
149 | | - if ( ( $linker === null ) || ( !$this->isValid() ) || ( $this->m_outformat == '-' ) || ( $this->m_caption === '' ) ) { |
| 149 | + if ( is_null( $linker ) || $linker === false || ( !$this->isValid() ) || ( $this->m_outformat == '-' ) || ( $this->m_caption === '' ) ) { |
150 | 150 | return htmlspecialchars( $this->getCaption() ); |
151 | 151 | } elseif ( $this->getNamespace() == NS_MEDIA ) { // this extra case *is* needed |
152 | 152 | return $linker->makeMediaLinkObj( $this->getTitle(), $this->getCaption() ); |
Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QueryPrinter.php |
— | — | @@ -303,7 +303,7 @@ |
304 | 304 | if ( array_key_exists( 'searchlabel', $params ) ) { |
305 | 305 | $this->mSearchlabel = $params['searchlabel'] === false ? null : $params['searchlabel']; |
306 | 306 | } |
307 | | - |
| 307 | + |
308 | 308 | switch ( $params['link'] ) { |
309 | 309 | case 'head': case 'subject': |
310 | 310 | $this->mLinkFirst = true; |