r22984 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22983‎ | r22984 | r22985 >
Date:15:15, 14 June 2007
Author:mkroetzsch
Status:old
Tags:
Comment:
Fixed creation of registered data values
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php
@@ -110,7 +110,7 @@
111111 }
112112 $vc[0] = true;
113113 }
114 - return new $dv[2]($dv[3]);
 114+ $result = new $vc[2]($vc[3]);
115115 } else {
116116 // check for n-ary types
117117 $types = explode(';', $typestring);
@@ -125,12 +125,12 @@
126126 ///TODO
127127 $type = SMWTypeHandlerFactory::getTypeHandlerByLabel($typestring);
128128 $result = new SMWOldDataValue($type);
129 - if ($value !== false) {
130 - $result->setUserValue($value);
131 - }
132 - return $result;
133129 }
134130 }
 131+ if ($value !== false) {
 132+ $result->setUserValue($value);
 133+ }
 134+ return $result;
135135 }
136136
137137 /**

Status & tagging log