r93320 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93319‎ | r93320 | r93321 >
Date:22:23, 27 July 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
applied patch by f.trott for bug 29654
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2_Queries.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2_Queries.php
@@ -597,7 +597,7 @@
598598 $query->jointable = $proptable->name;
599599
600600 if ( $property->isInverse() ) { // see if we can support inverses by inverting the proptable data
601 - if ( ( count( $proptable->objectfields ) == 1 ) && ( $proptable->objectfields[0] == 'p' ) ) {
 601+ if ( ( count( $proptable->objectfields ) == 1 ) && ( reset( $proptable->objectfields ) == 'p' ) ) {
602602 $keys = array_keys( $proptable->objectfields );
603603 $query->joinfield = $query->alias . '.' . $keys[0];
604604 $objectfields = array( 's_id' => 'p' );