r111235 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111234‎ | r111235 | r111236 >
Date:14:42, 11 February 2012
Author:mkroetzsch
Status:deferred
Tags:
Comment:
avoid extra braces around FILTER expressions in SPARQL; fixes Bug 30993
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SparqlStoreQueryEngine.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SparqlStoreQueryEngine.php
@@ -710,7 +710,11 @@
711711 $condition = "$subjectName $propertyName $objectName .\n";
712712 $innerConditionString = $innerCondition->getCondition() . $innerCondition->getWeakConditionString();
713713 if ( $innerConditionString !== '' ) {
714 - $condition .= "{ $innerConditionString}\n" ;
 714+ if ( $innerCondition instanceof SMWSparqlFilterCondition ) {
 715+ $condition .= $innerConditionString;
 716+ } else {
 717+ $condition .= "{ $innerConditionString}\n";
 718+ }
715719 }
716720 $result = new SMWSparqlWhereCondition( $condition, true, $namespaces );
717721