Index: trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php |
— | — | @@ -592,13 +592,18 @@ |
593 | 593 | |
594 | 594 | /** |
595 | 595 | * Uses the ResourceLoader (available with MediaWiki 1.17 and higher) |
596 | | - * to load all the necessary JS and CSS files for the combobox. |
| 596 | + * to load all the necessary JS and CSS files for comboboxes. |
597 | 597 | */ |
598 | 598 | public static function loadJavascriptAndCSS() { |
599 | 599 | global $wgOut; |
600 | 600 | $wgOut->addModules( 'ext.semanticdrilldown.combobox' ); |
601 | 601 | } |
602 | 602 | |
| 603 | + /** |
| 604 | + * Adds Javascript and CSS to the page for comboboxes, the long way. |
| 605 | + * This method exists for backward compatibiity for MediaWiki 1.16 |
| 606 | + * and earlier. |
| 607 | + */ |
603 | 608 | function addJavascriptAndCSS() { |
604 | 609 | global $smwgJQueryIncluded, $smwgJQueryUIIncluded, $sdgScriptPath, $wgOut; |
605 | 610 | |
— | — | @@ -628,8 +633,7 @@ |
629 | 634 | } |
630 | 635 | |
631 | 636 | function printComboBoxInput( $filter_name, $filter_values, $cur_value = null ) { |
632 | | - global $wgRequest, $smwgJQueryIncluded, $smwgJQueryUIIncluded; |
633 | | - global $wgOut; |
| 637 | + global $wgRequest, $sdgJQueryIncluded, $wgOut; |
634 | 638 | |
635 | 639 | // MW 1.17 + |
636 | 640 | if ( class_exists( 'ResourceLoader' ) ) { |
— | — | @@ -640,6 +644,9 @@ |
641 | 645 | } |
642 | 646 | |
643 | 647 | $filter_name = str_replace( ' ', '_', $filter_name ); |
| 648 | + // URL-decode the filter name - necessary if it contains |
| 649 | + // any non-Latin characters. |
| 650 | + $filter_name = urldecode( $filter_name ); |
644 | 651 | $input_id = "_search_$filter_name"; |
645 | 652 | $combobox_id = "c_search_$filter_name"; |
646 | 653 | |