r55597 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55596‎ | r55597 | r55598 >
Date:15:26, 26 August 2009
Author:mkroetzsch
Status:deferred
Tags:
Comment:
properly create values for inverse properties
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php
@@ -88,7 +88,11 @@
8989 * set later on.
9090 */
9191 static public function newPropertyObjectValue(SMWPropertyValue $property, $value=false, $caption=false) {
92 - return SMWDataValueFactory::newTypeObjectValue($property->getTypesValue(), $value, $caption, $property);
 92+ if ($property->isInverse()) {
 93+ return SMWDataValueFactory::newTypeIdValue('_wpg', $value, $caption, $property);
 94+ } else {
 95+ return SMWDataValueFactory::newTypeObjectValue($property->getTypesValue(), $value, $caption, $property);
 96+ }
9397 }
9498
9599 /**

Status & tagging log