r91451 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91450‎ | r91451 | r91452 >
Date:11:50, 5 July 2011
Author:mkroetzsch
Status:deferred
Tags:
Comment:
no sortkey for internal objects
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
@@ -130,7 +130,9 @@
131131 // *** Prepare the cache ***//
132132 if ( !array_key_exists( $sid, $this->m_semdata ) ) { // new cache entry
133133 $this->m_semdata[$sid] = new SMWSqlStubSemanticData( $subject, false );
134 - $this->m_semdata[$sid]->addPropertyStubValue( '_SKEY', array( $sortkey ) );
 134+ if ( $subject->getSubobjectId() == '' ) { // no sortkey for subobjects
 135+ $this->m_semdata[$sid]->addPropertyStubValue( '_SKEY', array( $sortkey ) );
 136+ }
135137 $this->m_sdstate[$sid] = array();
136138 // Note: the sortkey is always set but belongs to no property table,
137139 // hence no entry in $this->m_sdstate[$sid] is made.