r86823 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86822‎ | r86823 | r86824 >
Date:17:32, 24 April 2011
Author:yaron
Status:deferred
Tags:
Comment:
Added support for SMW 1.6
Modified paths:
  • /trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php
@@ -1101,9 +1101,9 @@
11021102 $out->addHTML( $html );
11031103 }
11041104
1105 - // Take non-semantic result set returned by Database->query() method, and
1106 - // wrap it in a SMWQueryResult container for passing to any of the various
1107 - // semantic result printers.
 1105+ // Take non-semantic result set returned by Database->query() method,
 1106+ // and wrap it in a SMWQueryResult container for passing to any of the
 1107+ // various semantic result printers.
11081108 // Code stolen largely from SMWSQLStore2QueryEngine->getInstanceQueryResult() method.
11091109 // (does this mean it will only work with certain semantic SQL stores?)
11101110 function addSemanticResultWrapper( $dbr, $res, $num, $query, $mainlabel, $printouts ) {
@@ -1112,7 +1112,11 @@
11131113 $store = smwfGetStore();
11141114 while ( ( $count < $num ) && ( $row = $dbr->fetchObject( $res ) ) ) {
11151115 $count++;
1116 - $qr[] = SMWWikiPageValue::makePage( $row->t, $row->ns, $row->sortkey );
 1116+ if ( class_exists( 'SMWDIWikiPage' ) ) {
 1117+ $qr[] = new SMWDIWikiPage( $row->t, $row->ns, null );
 1118+ } else {
 1119+ $qr[] = SMWWikiPageValue::makePage( $row->t, $row->ns, $row->sortkey );
 1120+ }
11171121 if ( method_exists( $store, 'cacheSMWPageID' ) ) {
11181122 $store->cacheSMWPageID( $row->id, $row->t, $row->ns, $row->iw );
11191123 }

Status & tagging log