Index: trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php |
— | — | @@ -1101,9 +1101,9 @@ |
1102 | 1102 | $out->addHTML( $html ); |
1103 | 1103 | } |
1104 | 1104 | |
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. |
1108 | 1108 | // Code stolen largely from SMWSQLStore2QueryEngine->getInstanceQueryResult() method. |
1109 | 1109 | // (does this mean it will only work with certain semantic SQL stores?) |
1110 | 1110 | function addSemanticResultWrapper( $dbr, $res, $num, $query, $mainlabel, $printouts ) { |
— | — | @@ -1112,7 +1112,11 @@ |
1113 | 1113 | $store = smwfGetStore(); |
1114 | 1114 | while ( ( $count < $num ) && ( $row = $dbr->fetchObject( $res ) ) ) { |
1115 | 1115 | $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 | + } |
1117 | 1121 | if ( method_exists( $store, 'cacheSMWPageID' ) ) { |
1118 | 1122 | $store->cacheSMWPageID( $row->id, $row->t, $row->ns, $row->iw ); |
1119 | 1123 | } |