Index: trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php |
— | — | @@ -9,41 +9,176 @@ |
10 | 10 | |
11 | 11 | if (!defined('MEDIAWIKI')) die(); |
12 | 12 | |
13 | | -class SDBrowseData extends SpecialPage { |
| 13 | +class SDBrowseData extends IncludableSpecialPage { |
14 | 14 | |
15 | 15 | /** |
16 | 16 | * Constructor |
17 | 17 | */ |
18 | | - public function SDBrowseData() { |
19 | | - SpecialPage::SpecialPage('BrowseData'); |
| 18 | + public function __construct() { |
| 19 | + parent::__construct('BrowseData'); |
20 | 20 | wfLoadExtensionMessages('SemanticDrilldown'); |
21 | 21 | } |
22 | 22 | |
23 | 23 | function execute( $query ) { |
| 24 | + global $wgRequest, $wgOut, $wgTitle; |
| 25 | + global $sdgScriptPath, $sdgContLang, $sdgNumResultsPerPage; |
| 26 | + |
| 27 | + if ($wgTitle->getNamespace() != NS_SPECIAL) { |
| 28 | + global $wgParser; |
| 29 | + $wgParser->disableCache(); |
| 30 | + } |
24 | 31 | $this->setHeaders(); |
25 | | - doSpecialBrowseData( $query ); |
| 32 | + $mainCssDir = $sdgScriptPath . '/skins/'; |
| 33 | + $wgOut->addLink( array( |
| 34 | + 'rel' => 'stylesheet', |
| 35 | + 'type' => 'text/css', |
| 36 | + 'media' => "screen", |
| 37 | + 'href' => $mainCssDir . 'SD_main.css' |
| 38 | + )); |
| 39 | + $wgOut->addLink( array( |
| 40 | + 'rel' => 'stylesheet', |
| 41 | + 'type' => 'text/css', |
| 42 | + 'media' => "screen", |
| 43 | + 'href' => $mainCssDir . 'xtheme-gray.css' |
| 44 | + )); |
| 45 | + $wgOut->addLink( array( |
| 46 | + 'rel' => 'stylesheet', |
| 47 | + 'type' => 'text/css', |
| 48 | + 'media' => "screen", |
| 49 | + 'href' => $mainCssDir . 'combos.css' |
| 50 | + )); |
| 51 | + $javascript_text =<<<END |
| 52 | +function toggleFilterDiv(element_id, label_element) { |
| 53 | + element = document.getElementById(element_id); |
| 54 | + if (element.style.display == "none") { |
| 55 | + element.style.display = "block"; |
| 56 | + label_element.innerHTML = "<img src=\"$sdgScriptPath/skins/down-arrow.png\">"; |
| 57 | + } else { |
| 58 | + element.style.display = "none"; |
| 59 | + label_element.innerHTML = "<img src=\"$sdgScriptPath/skins/right-arrow.png\">"; |
26 | 60 | } |
27 | 61 | } |
28 | 62 | |
29 | | -class BrowseDataPage extends QueryPage { |
| 63 | +function highlightRemoveDiv(element) { |
| 64 | + element.innerHTML = "<img src=\"$sdgScriptPath/skins/filter-x-active.png\">"; |
| 65 | +} |
| 66 | +function unhighlightRemoveDiv(element) { |
| 67 | + element.innerHTML = "<img src=\"$sdgScriptPath/skins/filter-x.png\">"; |
| 68 | +} |
| 69 | + |
| 70 | +END; |
| 71 | + $wgOut->addScript(' <script type="text/javascript">' . "\n" . $javascript_text . '</script>' . "\n"); |
| 72 | + |
| 73 | + // set default |
| 74 | + if ($sdgNumResultsPerPage == null) |
| 75 | + $sdgNumResultsPerPage = 250; |
| 76 | + list( $limit, $offset ) = wfCheckLimits($sdgNumResultsPerPage, 'sdlimit'); |
| 77 | + $filters = array(); |
| 78 | + |
| 79 | + // get information on current category, subcategory and filters |
| 80 | + // that have already been applied from the query string |
| 81 | + $category = str_replace('_', ' ', $wgRequest->getVal('_cat')); |
| 82 | + // if query string did not contain this variables, try the URL |
| 83 | + if (! $category) { |
| 84 | + $queryparts = explode('/', $query, 1); |
| 85 | + $category = isset($queryparts[0]) ? $queryparts[0] : ''; |
| 86 | + } |
| 87 | + if (! $category) { |
| 88 | + $category_title = wfMsg('browsedata'); |
| 89 | + } else { |
| 90 | + $titles_for_category = SDUtils::getValuesForProperty($category, NS_CATEGORY, '_SD_DT', SD_SP_HAS_DRILLDOWN_TITLE, NS_MAIN); |
| 91 | + if (count($titles_for_category) > 0) { |
| 92 | + $category_title = str_replace('_', ' ', $titles_for_category[0]); |
| 93 | + } else { |
| 94 | + $category_title = wfMsg( 'browsedata' ) . html_entity_decode( wfMsg( 'colon-separator' ) ) . str_replace( '_', ' ', $category ); |
| 95 | + } |
| 96 | + } |
| 97 | + // if no category was specified, go with the first |
| 98 | + // category on the site, alphabetically |
| 99 | + if (! $category) { |
| 100 | + $categories = SDUtils::getTopLevelCategories(); |
| 101 | + if (count($categories) > 0) { |
| 102 | + $category = $categories[0]; |
| 103 | + } |
| 104 | + } |
| 105 | + |
| 106 | + $wgOut->setPageTitle($category_title); |
| 107 | + $subcategory = $wgRequest->getVal('_subcat'); |
| 108 | + |
| 109 | + $filters = SDUtils::loadFiltersForCategory($category); |
| 110 | + |
| 111 | + $filters_used = array(); |
| 112 | + foreach ($filters as $i => $filter) |
| 113 | + $filter_used[] = false; |
| 114 | + $applied_filters = array(); |
| 115 | + $remaining_filters = array(); |
| 116 | + foreach ($filters as $i => $filter) { |
| 117 | + $filter_name = str_replace(' ', '_', $filter->name); |
| 118 | + $search_term = $wgRequest->getVal('_search_' . $filter_name); |
| 119 | + $lower_date = $wgRequest->getArray('_lower_' . $filter_name); |
| 120 | + $upper_date = $wgRequest->getArray('_upper_' . $filter_name); |
| 121 | + if ($vals_array = $wgRequest->getArray($filter_name)) { |
| 122 | + foreach ($vals_array as $j => $val) { |
| 123 | + $vals_array[$j] = str_replace('_', ' ', $val); |
| 124 | + } |
| 125 | + $applied_filters[] = SDAppliedFilter::create($filter, $vals_array); |
| 126 | + $filter_used[$i] = true; |
| 127 | + } elseif ($search_term != null) { |
| 128 | + $applied_filters[] = SDAppliedFilter::create($filter, array(), $search_term); |
| 129 | + $filter_used[$i] = true; |
| 130 | + } elseif ($lower_date != null || $upper_date != null) { |
| 131 | + $applied_filters[] = SDAppliedFilter::create($filter, array(), null, $lower_date, $upper_date); |
| 132 | + $filter_used[$i] = true; |
| 133 | + } |
| 134 | + } |
| 135 | + // add every unused filter to the $remaining_filters array, |
| 136 | + // unless it requires some other filter that hasn't been applied |
| 137 | + foreach ($filters as $i => $filter) { |
| 138 | + $required_filters = SDUtils::getValuesForProperty($filter->name, SD_NS_FILTER, '_SD_RF', SD_SP_REQUIRES_FILTER, SD_NS_FILTER); |
| 139 | + $matched_all_required_filters = true; |
| 140 | + foreach ($required_filters as $required_filter) { |
| 141 | + $found_match = false; |
| 142 | + foreach ($applied_filters as $af) { |
| 143 | + if ($af->filter->name == $required_filter) { |
| 144 | + $found_match = true; |
| 145 | + } |
| 146 | + } |
| 147 | + if (! $found_match) { |
| 148 | + $matched_all_required_filters = false; |
| 149 | + continue; |
| 150 | + } |
| 151 | + } |
| 152 | + if ($matched_all_required_filters) { |
| 153 | + if (! $filter_used[$i]) |
| 154 | + $remaining_filters[] = $filter; |
| 155 | + } |
| 156 | + } |
| 157 | + |
| 158 | + $wgOut->addHTML("\n <div class=\"drilldown-results\">\n"); |
| 159 | + $rep = new SDBrowseDataPage($category, $subcategory, $applied_filters, $remaining_filters); |
| 160 | + $num = $rep->doQuery( $offset, $limit ); |
| 161 | + $wgOut->addHTML("\n </div> <!-- drilldown-results -->\n"); |
| 162 | + return $num; |
| 163 | + } |
| 164 | +} |
| 165 | + |
| 166 | +class SDBrowseDataPage extends QueryPage { |
30 | 167 | var $category = ""; |
31 | 168 | var $subcategory = ""; |
32 | 169 | var $next_level_subcategories = array(); |
33 | 170 | var $all_subcategories = array(); |
34 | 171 | var $applied_filters = array(); |
35 | 172 | var $remaining_filters = array(); |
36 | | - var $browse_data_title; |
37 | 173 | var $show_single_cat = false; |
38 | 174 | |
39 | 175 | /** |
40 | 176 | * Initialize the variables of this page |
41 | 177 | */ |
42 | | - function BrowseDataPage($category, $subcategory, $applied_filters, $remaining_filters) { |
| 178 | + function __construct($category, $subcategory, $applied_filters, $remaining_filters) { |
43 | 179 | $this->category = $category; |
44 | 180 | $this->subcategory = $subcategory; |
45 | 181 | $this->applied_filters = $applied_filters; |
46 | 182 | $this->remaining_filters = $remaining_filters; |
47 | | - $this->browse_data_title = Title::newFromText('BrowseData', NS_SPECIAL); |
48 | 183 | |
49 | 184 | $dbr = wfGetDB( DB_SLAVE ); |
50 | 185 | $categorylinks = $dbr->tableName( 'categorylinks' ); |
— | — | @@ -61,7 +196,8 @@ |
62 | 197 | } |
63 | 198 | |
64 | 199 | function makeBrowseURL($category, $applied_filters = array(), $subcategory = null) { |
65 | | - $url = $this->browse_data_title->getFullURL() . '/' . $category; |
| 200 | + global $wgTitle; |
| 201 | + $url = $wgTitle->getFullURL() . '/' . $category; |
66 | 202 | if ($this->show_single_cat) { |
67 | 203 | $url .= (strpos($url, '?')) ? '&' : '?'; |
68 | 204 | $url .= "_single"; |
— | — | @@ -117,9 +253,9 @@ |
118 | 254 | */ |
119 | 255 | function getSQLFromClauseForField($new_filter) { |
120 | 256 | $sql = "FROM semantic_drilldown_values sdv |
121 | | - LEFT OUTER JOIN semantic_drilldown_filter_values sdfv |
122 | | - ON sdv.id = sdfv.id |
123 | | - WHERE "; |
| 257 | + LEFT OUTER JOIN semantic_drilldown_filter_values sdfv |
| 258 | + ON sdv.id = sdfv.id |
| 259 | + WHERE "; |
124 | 260 | $sql .= $new_filter->checkSQL("sdfv.value"); |
125 | 261 | return $sql; |
126 | 262 | } |
— | — | @@ -250,7 +386,7 @@ |
251 | 387 | */ |
252 | 388 | function getNumResults($subcategory, $subcategories, $new_filter = null) { |
253 | 389 | $dbr = wfGetDB( DB_SLAVE ); |
254 | | - $sql = "SELECT COUNT(*) "; |
| 390 | + $sql = "SELECT COUNT(DISTINCT sdv.id) "; |
255 | 391 | if ($new_filter) |
256 | 392 | $sql .= $this->getSQLFromClauseForField($new_filter); |
257 | 393 | else |
— | — | @@ -270,30 +406,40 @@ |
271 | 407 | function isSyndicated() { return false; } |
272 | 408 | |
273 | 409 | function printCategoriesList($categories) { |
| 410 | + global $sdgShowCategoriesAsTabs; |
| 411 | + |
274 | 412 | $choose_category_text = wfMsg('sd_browsedata_choosecategory'); |
| 413 | + if ($sdgShowCategoriesAsTabs) { |
| 414 | + $cats_wrapper_class = "drilldown-categories-tabs-wrapper"; |
| 415 | + $cats_list_class = "drilldown-categories-tabs"; |
| 416 | + } else { |
| 417 | + $cats_wrapper_class = "drilldown-categories-wrapper"; |
| 418 | + $cats_list_class = "drilldown-categories"; |
| 419 | + } |
275 | 420 | $text =<<<END |
276 | 421 | |
277 | | - <div class="drilldown-categories-wrapper"> |
278 | | - <div class="drilldown-categories"> |
279 | | - <div class="drilldown-categories-header">$choose_category_text:</div> |
| 422 | + <div id="$cats_wrapper_class"> |
| 423 | + <p id="categories-header">$choose_category_text:</p> |
| 424 | + <ul id="$cats_list_class"> |
280 | 425 | |
281 | 426 | END; |
282 | 427 | foreach ($categories as $i => $category) { |
283 | 428 | $category_children = SDUtils::getCategoryChildren($category, false, 5); |
284 | | - $category_str = $category . " (" . count($category_children) . ")"; |
| 429 | + $category_str = $category . " (" . count(array_unique($category_children)) . ")"; |
285 | 430 | if (str_replace('_', ' ', $this->category) == $category) { |
286 | | - $text .= ' <div class="drilldown-category selected-category">'; |
| 431 | + $text .= ' <li class="category selected">'; |
287 | 432 | $text .= $category_str; |
288 | 433 | } else { |
289 | | - $text .= ' <div class="drilldown-category">'; |
| 434 | + $text .= ' <li class="category">'; |
290 | 435 | $category_url = $this->makeBrowseURL($category); |
291 | 436 | $text .= "<a href=\"$category_url\" title=\"$choose_category_text\">$category_str</a>"; |
292 | 437 | } |
293 | | - $text .= "</div>\n"; |
| 438 | + $text .= "</li>\n"; |
294 | 439 | } |
295 | 440 | $text .=<<<END |
296 | | - </div> |
297 | | - </div> |
| 441 | + </li> |
| 442 | + </ul> |
| 443 | + </div> |
298 | 444 | |
299 | 445 | END; |
300 | 446 | return $text; |
— | — | @@ -645,7 +791,6 @@ |
646 | 792 | global $sdgFiltersSmallestFontSize, $sdgFiltersLargestFontSize; |
647 | 793 | |
648 | 794 | $skin = $wgUser->getSkin(); |
649 | | - $browse_data_title = Title::newFromText('BrowseData', NS_SPECIAL); |
650 | 795 | $categories = SDUtils::getTopLevelCategories(); |
651 | 796 | // if there are no categories, escape quickly |
652 | 797 | if (count($categories) == 0) { |
— | — | @@ -666,7 +811,7 @@ |
667 | 812 | (count($this->remaining_filters) == 0)) { |
668 | 813 | return $header; |
669 | 814 | } |
670 | | - $header .= ' <div class="drilldown-header">' . "\n"; |
| 815 | + $header .= ' <div id="drilldown-header">' . "\n"; |
671 | 816 | if (count ($this->applied_filters) > 0 || $this->subcategory) { |
672 | 817 | $category_url = $this->makeBrowseURL($this->category); |
673 | 818 | $header .= '<a href="' . $category_url . '" title="' . wfMsg('sd_browsedata_resetfilters') . '">' . str_replace('_', ' ', $this->category) . '</a>'; |
— | — | @@ -857,6 +1002,7 @@ |
858 | 1003 | $display_params = array_map('trim', $all_display_params[0]); |
859 | 1004 | SMWQueryProcessor::processFunctionParams($display_params, $querystring, $params, $printouts); |
860 | 1005 | } |
| 1006 | + $query = SMWQueryProcessor::createQuery($querystring, $params); |
861 | 1007 | if (array_key_exists('format', $params)) |
862 | 1008 | $format = $params['format']; |
863 | 1009 | else |
— | — | @@ -866,7 +1012,7 @@ |
867 | 1013 | } else { |
868 | 1014 | $mainlabel = ''; |
869 | 1015 | } |
870 | | - $r = $this->addSemanticResultWrapper($dbr, $res, $num, $mainlabel, $printouts); |
| 1016 | + $r = $this->addSemanticResultWrapper($dbr, $res, $num, $query, $mainlabel, $printouts); |
871 | 1017 | $printer = SMWQueryProcessor::getResultPrinter($format, SMWQueryProcessor::SPECIAL_PAGE, $r); |
872 | 1018 | |
873 | 1019 | $prresult = $printer->getResult($r, $params, SMW_OUTPUT_HTML); |
— | — | @@ -923,7 +1069,7 @@ |
924 | 1070 | // semantic result printers. |
925 | 1071 | // Code stolen largely from SMWSQLStore2QueryEngine->getInstanceQueryResult() method. |
926 | 1072 | // (does this mean it will only work with certain semantic SQL stores?) |
927 | | - function addSemanticResultWrapper($dbr, $res, $num, $mainlabel, $printouts) { |
| 1073 | + function addSemanticResultWrapper($dbr, $res, $num, $query, $mainlabel, $printouts) { |
928 | 1074 | $qr = array(); |
929 | 1075 | $count = 0; |
930 | 1076 | $store = smwfGetStore(); |
— | — | @@ -943,7 +1089,6 @@ |
944 | 1090 | $main_printout[$printrequest->getHash()] = $printrequest; |
945 | 1091 | $printouts = array_merge($main_printout, $printouts); |
946 | 1092 | |
947 | | - $query = new SMWQuery(); |
948 | 1093 | // for SMW 1.5+, handling is quite easy |
949 | 1094 | if (! class_exists('SMWTemplateResultPrinter')) { |
950 | 1095 | return new SMWQueryResult($printouts, $query, $qr, $store, ($count > $num) ); |
— | — | @@ -998,138 +1143,3 @@ |
999 | 1144 | return "\n <br style=\"clear: both\" />\n"; |
1000 | 1145 | } |
1001 | 1146 | } |
1002 | | - |
1003 | | -function doSpecialBrowseData($query) { |
1004 | | - global $wgRequest, $wgOut, $sdgScriptPath, $sdgContLang, $sdgNumResultsPerPage; |
1005 | | - $mainCssDir = $sdgScriptPath . '/skins/'; |
1006 | | - $wgOut->addLink( array( |
1007 | | - 'rel' => 'stylesheet', |
1008 | | - 'type' => 'text/css', |
1009 | | - 'media' => "screen", |
1010 | | - 'href' => $mainCssDir . 'SD_main.css' |
1011 | | - )); |
1012 | | - $wgOut->addLink( array( |
1013 | | - 'rel' => 'stylesheet', |
1014 | | - 'type' => 'text/css', |
1015 | | - 'media' => "screen", |
1016 | | - 'href' => $mainCssDir . 'xtheme-gray.css' |
1017 | | - )); |
1018 | | - $wgOut->addLink( array( |
1019 | | - 'rel' => 'stylesheet', |
1020 | | - 'type' => 'text/css', |
1021 | | - 'media' => "screen", |
1022 | | - 'href' => $mainCssDir . 'combos.css' |
1023 | | - )); |
1024 | | - $javascript_text =<<<END |
1025 | | -function toggleFilterDiv(element_id, label_element) { |
1026 | | - element = document.getElementById(element_id); |
1027 | | - if (element.style.display == "none") { |
1028 | | - element.style.display = "block"; |
1029 | | - label_element.innerHTML = "<img src=\"$sdgScriptPath/skins/down-arrow.png\">"; |
1030 | | - } else { |
1031 | | - element.style.display = "none"; |
1032 | | - label_element.innerHTML = "<img src=\"$sdgScriptPath/skins/right-arrow.png\">"; |
1033 | | - } |
1034 | | -} |
1035 | | - |
1036 | | -function highlightRemoveDiv(element) { |
1037 | | - element.innerHTML = "<img src=\"$sdgScriptPath/skins/filter-x-active.png\">"; |
1038 | | -} |
1039 | | -function unhighlightRemoveDiv(element) { |
1040 | | - element.innerHTML = "<img src=\"$sdgScriptPath/skins/filter-x.png\">"; |
1041 | | -} |
1042 | | - |
1043 | | -END; |
1044 | | - $wgOut->addScript(' <script type="text/javascript">' . "\n" . $javascript_text . '</script>' . "\n"); |
1045 | | - |
1046 | | - // set default |
1047 | | - if ($sdgNumResultsPerPage == null) |
1048 | | - $sdgNumResultsPerPage = 250; |
1049 | | - list( $limit, $offset ) = wfCheckLimits($sdgNumResultsPerPage, 'sdlimit'); |
1050 | | - $filters = array(); |
1051 | | - |
1052 | | - // get information on current category, subcategory and filters that |
1053 | | - // have already been applied from the query string |
1054 | | - $category = str_replace('_', ' ', $wgRequest->getVal('_cat')); |
1055 | | - // if query string did not contain this variables, try the URL |
1056 | | - if (! $category) { |
1057 | | - $queryparts = explode('/', $query, 1); |
1058 | | - $category = isset($queryparts[0]) ? $queryparts[0] : ''; |
1059 | | - } |
1060 | | - if (! $category) { |
1061 | | - $category_title = wfMsg('browsedata'); |
1062 | | - } else { |
1063 | | - $titles_for_category = SDUtils::getValuesForProperty($category, NS_CATEGORY, '_SD_DT', SD_SP_HAS_DRILLDOWN_TITLE, NS_MAIN); |
1064 | | - if (count($titles_for_category) > 0) { |
1065 | | - $category_title = str_replace('_', ' ', $titles_for_category[0]); |
1066 | | - } else { |
1067 | | - $category_title = wfMsg( 'browsedata' ) . html_entity_decode( wfMsg( 'colon-separator' ) ) . str_replace( '_', ' ', $category ); |
1068 | | - } |
1069 | | - } |
1070 | | - // if no category was specified, go with the first |
1071 | | - // category on the site, alphabetically |
1072 | | - if (! $category) { |
1073 | | - $categories = SDUtils::getTopLevelCategories(); |
1074 | | - if (count($categories) > 0) { |
1075 | | - $category = $categories[0]; |
1076 | | - } |
1077 | | - } |
1078 | | - |
1079 | | - $wgOut->setPageTitle($category_title); |
1080 | | - $subcategory = $wgRequest->getVal('_subcat'); |
1081 | | - |
1082 | | - $filters = SDUtils::loadFiltersForCategory($category); |
1083 | | - |
1084 | | - $filters_used = array(); |
1085 | | - foreach ($filters as $i => $filter) |
1086 | | - $filter_used[] = false; |
1087 | | - $applied_filters = array(); |
1088 | | - $remaining_filters = array(); |
1089 | | - foreach ($filters as $i => $filter) { |
1090 | | - $filter_name = str_replace(' ', '_', $filter->name); |
1091 | | - $search_term = $wgRequest->getVal('_search_' . $filter_name); |
1092 | | - $lower_date = $wgRequest->getArray('_lower_' . $filter_name); |
1093 | | - $upper_date = $wgRequest->getArray('_upper_' . $filter_name); |
1094 | | - if ($vals_array = $wgRequest->getArray($filter_name)) { |
1095 | | - foreach ($vals_array as $j => $val) { |
1096 | | - $vals_array[$j] = str_replace('_', ' ', $val); |
1097 | | - } |
1098 | | - $applied_filters[] = SDAppliedFilter::create($filter, $vals_array); |
1099 | | - $filter_used[$i] = true; |
1100 | | - } elseif ($search_term != null) { |
1101 | | - $applied_filters[] = SDAppliedFilter::create($filter, array(), $search_term); |
1102 | | - $filter_used[$i] = true; |
1103 | | - } elseif ($lower_date != null || $upper_date != null) { |
1104 | | - $applied_filters[] = SDAppliedFilter::create($filter, array(), null, $lower_date, $upper_date); |
1105 | | - $filter_used[$i] = true; |
1106 | | - } |
1107 | | - } |
1108 | | - // add every unused filter to the $remaining_filters array, unless |
1109 | | - // it requires some other filter that hasn't been applied |
1110 | | - foreach ($filters as $i => $filter) { |
1111 | | - $required_filters = SDUtils::getValuesForProperty($filter->name, SD_NS_FILTER, '_SD_RF', SD_SP_REQUIRES_FILTER, SD_NS_FILTER); |
1112 | | - $matched_all_required_filters = true; |
1113 | | - foreach ($required_filters as $required_filter) { |
1114 | | - $found_match = false; |
1115 | | - foreach ($applied_filters as $af) { |
1116 | | - if ($af->filter->name == $required_filter) { |
1117 | | - $found_match = true; |
1118 | | - } |
1119 | | - } |
1120 | | - if (! $found_match) { |
1121 | | - $matched_all_required_filters = false; |
1122 | | - continue; |
1123 | | - } |
1124 | | - } |
1125 | | - if ($matched_all_required_filters) { |
1126 | | - if (! $filter_used[$i]) |
1127 | | - $remaining_filters[] = $filter; |
1128 | | - } |
1129 | | - } |
1130 | | - |
1131 | | - $wgOut->addHTML("\n <div class=\"drilldown-results\">\n"); |
1132 | | - $rep = new BrowseDataPage($category, $subcategory, $applied_filters, $remaining_filters); |
1133 | | - $num = $rep->doQuery( $offset, $limit ); |
1134 | | - $wgOut->addHTML("\n </div> <!-- drilldown-results -->\n"); |
1135 | | - return $num; |
1136 | | -} |