r92225 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92224‎ | r92225 | r92226 >
Date:02:15, 15 July 2011
Author:yaron
Status:deferred
Tags:
Comment:
Added handling for recent-ish change in SMW 1.6
Modified paths:
  • /trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php
@@ -1125,12 +1125,18 @@
11261126 while ( ( $count < $num ) && ( $row = $dbr->fetchObject( $res ) ) ) {
11271127 $count++;
11281128 if ( class_exists( 'SMWDIWikiPage' ) ) {
 1129+ // SMW 1.6
11291130 $qr[] = new SMWDIWikiPage( $row->t, $row->ns, null );
11301131 } else {
11311132 $qr[] = SMWWikiPageValue::makePage( $row->t, $row->ns, $row->sortkey );
11321133 }
11331134 if ( method_exists( $store, 'cacheSMWPageID' ) ) {
1134 - $store->cacheSMWPageID( $row->id, $row->t, $row->ns, $row->iw );
 1135+ if ( method_exists( 'SMWDIWikiPage', 'getSubobjectName' ) ) {
 1136+ // SMW 1.6
 1137+ $store->cacheSMWPageID( $row->id, $row->t, $row->ns, $row->iw, '' );
 1138+ } else {
 1139+ $store->cacheSMWPageID( $row->id, $row->t, $row->ns, $row->iw );
 1140+ }
11351141 }
11361142 }
11371143 if ( $dbr->fetchObject( $res ) ) {