Index: trunk/extensions/CentralNotice/CentralNotice.php |
— | — | @@ -145,7 +145,7 @@ |
146 | 146 | global $wgUser, $wgOut, $wgCentralDBname, $wgScript; |
147 | 147 | |
148 | 148 | // Include '.js' to exempt script from squid cache override |
149 | | - $centralLoader = $wgScript . '?title=' . SpecialPage::getTitleFor( 'BannerController' ) . '&cache=cn.js'; |
| 149 | + $centralLoader = SpecialPage::getTitleFor( 'BannerController' )->getLocalUrl( 'cache=cn.js' ); |
150 | 150 | |
151 | 151 | // Insert the banner controller Javascript into the <head> |
152 | 152 | $wgOut->addScriptFile( $centralLoader ); |
Index: trunk/extensions/CentralNotice/SpecialBannerController.php |
— | — | @@ -69,8 +69,8 @@ |
70 | 70 | } else { |
71 | 71 | var geoLocation = Geo.country; // pull the geo info |
72 | 72 | } |
73 | | - var bannerListQuery = $.param( { 'language': wgContentLanguage, 'project': wgNoticeProject, 'country': geoLocation, 'cache': 'cn.js' } ); |
74 | | - bannerListURL = wgScript + '?title=' + wgFormattedNamespaces[-1] + ':BannerListLoader&' + bannerListQuery; |
| 73 | + var bannerListQuery = $.param( { 'title': wgFormattedNamespaces[-1] + ':BannerListLoader', 'language': wgContentLanguage, 'project': wgNoticeProject, 'country': geoLocation, 'cache': 'cn.js' } ); |
| 74 | + bannerListURL = wgScript + '?' + bannerListQuery; |
75 | 75 | var request = $.ajax( { |
76 | 76 | url: bannerListURL, |
77 | 77 | dataType: 'json', |