r86614 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86613‎ | r86614 | r86615 >
Date:10:25, 21 April 2011
Author:mkroetzsch
Status:deferred
Tags:
Comment:
fixed use of new data items
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Concept.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_Concept.php
@@ -18,6 +18,9 @@
1919 /**
2020 * Method for handling the ask concept function.
2121 *
 22+ * @todo The possible use of this in an HTML or Specal page context needs to be revisited. The code mentions it, but can this actually happen?
 23+ * @todo The escaping of symbols in concept queries needs to be revisited.
 24+ *
2225 * @since 1.5.3
2326 *
2427 * @param Parser $parser
@@ -54,11 +57,9 @@
5558 $query = SMWQueryProcessor::createQuery( $concept_input, array( 'limit' => 20, 'format' => 'list' ), SMWQueryProcessor::CONCEPT_DESC );
5659 $concept_text = $query->getDescription()->getQueryString();
5760
58 - $dv = SMWDataValueFactory::newPropertyObjectValue( $pconc );
59 - $dv->setValues( $concept_text, $concept_docu, $query->getDescription()->getQueryFeatures(), $query->getDescription()->getSize(), $query->getDescription()->getDepth() );
60 -
6161 if ( SMWParseData::getSMWData( $parser ) !== null ) {
62 - SMWParseData::getSMWData( $parser )->addPropertyObjectValue( $pconc, $dv );
 62+ $diConcept = new SMWDIConcept( $concept_text, $concept_docu, $query->getDescription()->getQueryFeatures(), $query->getDescription()->getSize(), $query->getDescription()->getDepth() );
 63+ SMWParseData::getSMWData( $parser )->addPropertyObjectValue( $pconc, $diConcept );
6364 }
6465
6566 // display concept box:

Status & tagging log