Index: trunk/extensions/CentralNotice/SpecialBannerController.php |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | * In order to circumvent the normal squid cache override we add '/cn.js' to the bannerlist URL. |
45 | 45 | */ |
46 | 46 | function getOutput() { |
47 | | - global $wgCentralPagePath; |
| 47 | + global $wgCentralPagePath, $wgContLang; |
48 | 48 | |
49 | 49 | $js = $this->getScriptFunctions() . $this->getToggleScripts(); |
50 | 50 | $js .= <<<JAVASCRIPT |
— | — | @@ -76,7 +76,11 @@ |
77 | 77 | var geoLocation = Geo.country; // pull the geo info |
78 | 78 | } |
79 | 79 | var bannerListQuery = $.param( { 'language': wgContentLanguage, 'project': wgNoticeProject, 'country': geoLocation } ); |
80 | | - var bannerListURL = wgScript + '?title=' + encodeURIComponent(wgFormattedNamespaces[-1]) + ':BannerListLoader&cache=/cn.js&' + bannerListQuery; |
| 80 | +JAVASCRIPT; |
| 81 | + $js .= "\n\t\t\t\tvar bannerListURL = wgScript + '?title=' + encodeURIComponent('" . |
| 82 | + $wgContLang->specialPage( 'BannerListLoader' ) . |
| 83 | + "') + '&cache=/cn.js&' + bannerListQuery;\n"; |
| 84 | + $js .= <<<JAVASCRIPT |
81 | 85 | var request = $.ajax( { |
82 | 86 | url: bannerListURL, |
83 | 87 | dataType: 'json', |
— | — | @@ -177,5 +181,5 @@ |
178 | 182 | JAVASCRIPT; |
179 | 183 | return $script; |
180 | 184 | } |
181 | | - |
| 185 | + |
182 | 186 | } |