https://www.mediawiki.org/wiki/Special:Code/MediaWiki/108371
Revision: 108371
Author: krinkle
Date: 2012-01-08 22:29:56 +0000 (Sun, 08 Jan 2012)
Log Message:
-----------
[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: trunk/extensions/CentralNotice/special/SpecialBannerController.php
===================================================================
--- trunk/extensions/CentralNotice/special/SpecialBannerController.php
2012-01-08 22:15:23 UTC (rev 108370)
+++ trunk/extensions/CentralNotice/special/SpecialBannerController.php
2012-01-08 22:29:56 UTC (rev 108371)
@@ -47,7 +47,8 @@
$js = $this->getScriptFunctions() . $this->getToggleScripts();
$js .= <<<JAVASCRIPT
-( function( $ ) {
+( function( $, mw ) { mw.loader.using( 'mediawiki.util', function () {
+
$.ajaxSetup({ cache: true });
$.centralNotice = {
data: {
@@ -166,7 +167,7 @@
}
} );
-} )( jQuery );
+} ); } )( jQuery, mediaWiki );
JAVASCRIPT;
return $js;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs