Index: trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php |
— | — | @@ -866,7 +866,12 @@ |
867 | 867 | $format = $params['format']; |
868 | 868 | else |
869 | 869 | $format = 'category'; |
870 | | - $r = $this->addSemanticResultWrapper($dbr, $res, $num, $printouts); |
| 870 | + if (array_key_exists('mainlabel', $params)) { |
| 871 | + $mainlabel = $params['mainlabel']; |
| 872 | + } else { |
| 873 | + $mainlabel = ''; |
| 874 | + } |
| 875 | + $r = $this->addSemanticResultWrapper($dbr, $res, $num, $mainlabel, $printouts); |
871 | 876 | $printer = SMWQueryProcessor::getResultPrinter($format, SMWQueryProcessor::SPECIAL_PAGE, $r); |
872 | 877 | |
873 | 878 | $prresult = $printer->getResult($r, $params, SMW_OUTPUT_HTML); |
— | — | @@ -923,7 +928,7 @@ |
924 | 929 | // semantic result printers. |
925 | 930 | // Code stolen largely from SMWSQLStore2QueryEngine->getInstanceQueryResult() method. |
926 | 931 | // (does this mean it will only work with certain semantic SQL stores?) |
927 | | - function addSemanticResultWrapper($dbr, $res, $num, $printouts) { |
| 932 | + function addSemanticResultWrapper($dbr, $res, $num, $mainlabel, $printouts) { |
928 | 933 | $qr = array(); |
929 | 934 | $count = 0; |
930 | 935 | $store = smwfGetStore(); |
— | — | @@ -938,7 +943,7 @@ |
939 | 944 | } |
940 | 945 | $dbr->freeResult($res); |
941 | 946 | |
942 | | - $printrequest = new SMWPrintRequest(SMWPrintRequest::PRINT_THIS, ''); |
| 947 | + $printrequest = new SMWPrintRequest(SMWPrintRequest::PRINT_THIS, $mainlabel); |
943 | 948 | $main_printout = array(); |
944 | 949 | $main_printout[$printrequest->getHash()] = $printrequest; |
945 | 950 | $printouts = array_merge($main_printout, $printouts); |