r37120 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37119‎ | r37120 | r37121 >
Date:17:05, 5 July 2008
Author:mkroetzsch
Status:old
Tags:
Comment:
undefinde concepts should have no results, fixed
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2_Queries.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2_Queries.php
@@ -318,8 +318,10 @@
319319 } elseif ($description instanceof SMWConceptDescription) { // fetch concept definition and insert it here
320320 $dv = end($this->m_store->getSpecialValues($description->getConcept(), SMW_SP_CONCEPT_DESC));
321321 $desctxt = ($dv!==false)?$dv->getXSDValue():false;
322 - if ($desctxt == false) { // no description found, no condition
323 - $qid = -1; ///TODO: announce an error here?
 322+ if ($desctxt == false) { // no description found, concept does not exist
 323+ // keep the above query object, it yields an empty result
 324+ ///TODO: announce an error here? (maybe not, since the query processor can check for
 325+ ///non-existing concept pages which is probably the main reason for finding nothing here
324326 } else { // parse description and process it recursively
325327 $qp = new SMWQueryParser();
326328 // no defaultnamespaces here; if any, these are already in the concept

Status & tagging log