Index: trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Record.php |
— | — | @@ -187,7 +187,7 @@ |
188 | 188 | $result = array(); |
189 | 189 | $index = 0; |
190 | 190 | foreach ( $this->getPropertyDataItems() as $diProperty ) { |
191 | | - $values = $this->getDataItem->getSemanticData()->getPropertyValues( $diProperty ); |
| 191 | + $values = $this->getDataItem()->getSemanticData()->getPropertyValues( $diProperty ); |
192 | 192 | if ( count( $values ) > 0 ) { |
193 | 193 | $result[$index] = reset( $values ); |
194 | 194 | } else { |
— | — | @@ -195,6 +195,7 @@ |
196 | 196 | } |
197 | 197 | $index += 1; |
198 | 198 | } |
| 199 | + return $result; |
199 | 200 | } else { |
200 | 201 | return array(); |
201 | 202 | } |
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_QueryResult.php |
— | — | @@ -427,8 +427,9 @@ |
428 | 428 | $pos = $this->mPrintRequest->getParameter( 'index' ) - 1; |
429 | 429 | $newcontent = array(); |
430 | 430 | |
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(); |
433 | 434 | if ( array_key_exists( $pos, $dataItems ) && |
434 | 435 | ( $dataItems[$pos] !== null ) ) { |
435 | 436 | $newcontent[] = $dataItems[$pos]; |