r107357 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107356‎ | r107357 | r107358 >
Date:02:30, 27 December 2011
Author:krinkle
Status:ok
Tags:
Comment:
[CentralNotice] Re-apply r107315, accidentally reverted in r107349
* Also switched from deprecated wgNamespaceNumber to mw.config
Modified paths:
  • /trunk/extensions/CentralNotice/special/SpecialBannerController.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/special/SpecialBannerController.php
@@ -99,11 +99,14 @@
100100 $wgContLang->specialPage( 'BannerListLoader' ) .
101101 "') + '&cache=/cn.js&' + bannerListQuery;\n";
102102 $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+ }
108111 },
109112 chooseBanner: function( bannerList ) {
110113 var groomedBannerList = [], i, j, pointer;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107315fix for bug 33372, disabling CentralNotice on Special pageskaldari06:34, 26 December 2011
r107349[CentralNotice] code quality and clean top...krinkle00:42, 27 December 2011

Status & tagging log