Index: trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php |
— | — | @@ -352,7 +352,8 @@ |
353 | 353 | // process input: |
354 | 354 | $params = func_get_args(); |
355 | 355 | array_shift( $params ); // we already know the $parser ... |
356 | | - $concept_input = array_shift( $params ); // use first parameter as concept (query) string |
| 356 | + $concept_input = str_replace(array('>','<'),array('>','<'),array_shift( $params )); // use first parameter as concept (query) string |
| 357 | + /// NOTE: the str_replace above is required in MediaWiki 1.11, but not in MediaWiki 1.14 |
357 | 358 | $query = SMWQueryProcessor::createQuery($concept_input, array('limit' => 20, 'format' => 'list'), SMWQueryProcessor::CONCEPT_DESC); |
358 | 359 | $concept_text = $query->getDescription()->getQueryString(); |
359 | 360 | $concept_docu = array_shift( $params ); // second parameter, if any, might be a description |
— | — | @@ -367,18 +368,11 @@ |
368 | 369 | $rdflink = SMWInfolink::newInternalLink(wfMsgForContent('smw_viewasrdf'), $wgContLang->getNsText(NS_SPECIAL) . ':ExportRDF/' . $title->getPrefixedText(), 'rdflink'); |
369 | 370 | smwfRequireHeadItem(SMW_HEADER_STYLE); |
370 | 371 | |
371 | | -// $qresult = smwfGetStore()->getQueryResult($query); |
372 | | -// $printer = SMWQueryProcessor::getResultPrinter('list', SMWQueryProcessor::CONCEPT_DESC, $qresult); |
373 | | -// $printer->setShowErrors(false); |
374 | | -// $resultlink = $printer->getResult($qresult, array('sep' => ',_'), SMW_OUTPUT_WIKI); |
375 | | - |
376 | 372 | $result = '<div class="smwfact"><span class="smwfactboxhead">' . wfMsgForContent('smw_concept_description',$title->getText()) . |
377 | 373 | (count($query->getErrors())>0?' ' . smwfEncodeMessages($query->getErrors()):'') . |
378 | 374 | '</span>' . '<span class="smwrdflink">' . $rdflink->getWikiText() . '</span>' . '<br />' . |
379 | 375 | ($concept_docu?"<p>$concept_docu</p>":'') . |
380 | | - '<pre>' . str_replace('[', '[', $concept_text) . "</pre>\n" . |
381 | | -// $resultlink . |
382 | | - '</div>'; |
| 376 | + '<pre>' . str_replace('[', '[', $concept_text) . "</pre>\n</div>"; |
383 | 377 | return $result; |
384 | 378 | } |
385 | 379 | |