Creating a way to toggle mw.config LEGACY_GLOBALS from LocalSettings (bug 28916).
authorKrinkle <krinkle@users.mediawiki.org>
Tue, 10 May 2011 23:17:13 +0000 (23:17 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Tue, 10 May 2011 23:17:13 +0000 (23:17 +0000)
commit49ce5de7d94bed8b023a73daab55d7eaa5c09ba1
treec013e51369b76071a7b387e4b68eb825d34f6ab1
parentbafa1bfdb128deeca558e45361003eb6b262cbaa
Creating a way to toggle mw.config LEGACY_GLOBALS from LocalSettings (bug 28916).
* I thought a while for a way to somehow get that global variable from php to the start of the main mediaWiki object creation. Considered using a (temporary) global variable and deleting afterwards, but that looked like a hack and wasn't sure about the cross-browser functioning of it. Instead ended up by moving it to the startUp module where other global variables are accessed as well. This seems to work pretty good.

* Can be toggled from LocalSettings by setting $wgLegacyJavaScriptGlobals.
* Changed some usages of mediaWiki to use the global mw alias instead.
includes/DefaultSettings.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderStartUpModule.php
resources/mediawiki/mediawiki.js