Index: trunk/extensions/CentralNotice/special/SpecialBannerController.php |
— | — | @@ -99,11 +99,14 @@ |
100 | 100 | $wgContLang->specialPage( 'BannerListLoader' ) . |
101 | 101 | "') + '&cache=/cn.js&' + bannerListQuery;\n"; |
102 | 102 | $js .= <<<JAVASCRIPT |
103 | | - $.ajax( { |
104 | | - url: bannerListURL, |
105 | | - dataType: 'json', |
106 | | - success: $.centralNotice.fn.chooseBanner |
107 | | - } ); |
| 103 | + // Prevent loading banners on Special pages |
| 104 | + if ( mw.config.get( 'wgNamespaceNumber' ) !== -1 ) { |
| 105 | + $.ajax( { |
| 106 | + url: bannerListURL, |
| 107 | + dataType: 'json', |
| 108 | + success: $.centralNotice.fn.chooseBanner |
| 109 | + } ); |
| 110 | + } |
108 | 111 | }, |
109 | 112 | chooseBanner: function( bannerList ) { |
110 | 113 | var groomedBannerList = [], i, j, pointer; |