Index: trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php |
— | — | @@ -1058,24 +1058,30 @@ |
1059 | 1059 | } else { |
1060 | 1060 | $query = new SMWQuery(); |
1061 | 1061 | } |
1062 | | - if ( array_key_exists( 'format', $params ) ) { |
1063 | | - $format = $params['format']; |
1064 | | - } else { |
1065 | | - $format = 'category'; |
| 1062 | + if ( !array_key_exists( 'format', $params ) ) { |
| 1063 | + $params['format'] = 'category'; |
1066 | 1064 | } |
| 1065 | + |
1067 | 1066 | if ( array_key_exists( 'mainlabel', $params ) ) { |
1068 | 1067 | $mainlabel = $params['mainlabel']; |
1069 | 1068 | } else { |
1070 | 1069 | $mainlabel = ''; |
1071 | 1070 | } |
| 1071 | + |
1072 | 1072 | $r = $this->addSemanticResultWrapper( $dbr, $res, $num, $query, $mainlabel, $printouts ); |
1073 | | - $printer = SMWQueryProcessor::getResultPrinter( $format, SMWQueryProcessor::SPECIAL_PAGE, $r ); |
| 1073 | + $printer = SMWQueryProcessor::getResultPrinter( $params['format'], SMWQueryProcessor::SPECIAL_PAGE, $r ); |
1074 | 1074 | |
1075 | | - $prresult = $printer->getResult( $r, $params, SMW_OUTPUT_HTML ); |
1076 | | - if ( is_array( $prresult ) ) |
1077 | | - $prtext = $prresult[0]; |
1078 | | - else |
1079 | | - $prtext = $prresult; |
| 1075 | + if ( version_compare( SMW_VERSION, '1.6.1', '>' ) ) { |
| 1076 | + $params = SMWQueryProcessor::getProcessedParams( $params ); |
| 1077 | + } |
| 1078 | + |
| 1079 | + $prresult = $printer->getResult( |
| 1080 | + $r, |
| 1081 | + $params, |
| 1082 | + SMW_OUTPUT_HTML |
| 1083 | + ); |
| 1084 | + |
| 1085 | + $prtext = is_array( $prresult ) ? $prresult[0] : $prresult; |
1080 | 1086 | |
1081 | 1087 | SMWOutputs::commitToOutputPage( $out ); |
1082 | 1088 | |
Index: trunk/extensions/SemanticDrilldown/SemanticDrilldown.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | |
15 | 15 | if ( !defined( 'MEDIAWIKI' ) ) die(); |
16 | 16 | |
17 | | -define( 'SD_VERSION', '0.8.3' ); |
| 17 | +define( 'SD_VERSION', '0.8.4 alpha' ); |
18 | 18 | |
19 | 19 | $wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'specialpage'][] = array( |
20 | 20 | 'path' => __FILE__, |