Index: trunk/extensions/CentralNotice/special/SpecialBannerController.php |
— | — | @@ -87,11 +87,13 @@ |
88 | 88 | $wgContLang->specialPage( 'BannerListLoader' ) . |
89 | 89 | "') + '&cache=/cn.js&' + bannerListQuery;\n"; |
90 | 90 | $js .= <<<JAVASCRIPT |
91 | | - var request = $.ajax( { |
92 | | - url: bannerListURL, |
93 | | - dataType: 'json', |
94 | | - success: $.centralNotice.fn.chooseBanner |
95 | | - } ); |
| 91 | + if ( wgNamespaceNumber !== -1 ) { // disable loading banners on Special pages |
| 92 | + var request = $.ajax( { |
| 93 | + url: bannerListURL, |
| 94 | + dataType: 'json', |
| 95 | + success: $.centralNotice.fn.chooseBanner |
| 96 | + } ); |
| 97 | + } |
96 | 98 | }, |
97 | 99 | 'chooseBanner': function( bannerList ) { |
98 | 100 | // Convert the json object to a true array |