r92406 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92405‎ | r92406 | r92407 >
Date:17:28, 17 July 2011
Author:mkroetzsch
Status:deferred
Tags:
Comment:
minor fixes
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Record.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_QueryResult.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Record.php
@@ -187,7 +187,7 @@
188188 $result = array();
189189 $index = 0;
190190 foreach ( $this->getPropertyDataItems() as $diProperty ) {
191 - $values = $this->getDataItem->getSemanticData()->getPropertyValues( $diProperty );
 191+ $values = $this->getDataItem()->getSemanticData()->getPropertyValues( $diProperty );
192192 if ( count( $values ) > 0 ) {
193193 $result[$index] = reset( $values );
194194 } else {
@@ -195,6 +195,7 @@
196196 }
197197 $index += 1;
198198 }
 199+ return $result;
199200 } else {
200201 return array();
201202 }
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_QueryResult.php
@@ -427,8 +427,9 @@
428428 $pos = $this->mPrintRequest->getParameter( 'index' ) - 1;
429429 $newcontent = array();
430430
431 - foreach ( $this->mContent as $listdv ) {
432 - $dataItems = $listdv->getDataItems();
 431+ foreach ( $this->mContent as $diContainer ) {
 432+ $recordValue = SMWDataValueFactory::newDataItemValue( $diContainer, $propertyValue->getDataItem() );
 433+ $dataItems = $recordValue->getDataItems();
433434 if ( array_key_exists( $pos, $dataItems ) &&
434435 ( $dataItems[$pos] !== null ) ) {
435436 $newcontent[] = $dataItems[$pos];