r108371 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108370‎ | r108371 | r108372 >
Date:22:29, 8 January 2012
Author:krinkle
Status:ok
Tags:
Comment:
[CentralNotice] This code uses mediawiki.util, dependency needs to be declared. Usually already loaded but in some race conditions this failed.
Modified paths:
  • /trunk/extensions/CentralNotice/special/SpecialBannerController.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/special/SpecialBannerController.php
@@ -47,7 +47,8 @@
4848
4949 $js = $this->getScriptFunctions() . $this->getToggleScripts();
5050 $js .= <<<JAVASCRIPT
51 -( function( $ ) {
 51+( function( $, mw ) { mw.loader.using( 'mediawiki.util', function () {
 52+
5253 $.ajaxSetup({ cache: true });
5354 $.centralNotice = {
5455 data: {
@@ -166,7 +167,7 @@
167168 }
168169 } );
169170
170 -} )( jQuery );
 171+} ); } )( jQuery, mediaWiki );
171172 JAVASCRIPT;
172173 return $js;
173174

Status & tagging log