clean up Html::inlineScript usage
authorKrinkle <krinkle@users.mediawiki.org>
Wed, 28 Sep 2011 22:47:05 +0000 (22:47 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Wed, 28 Sep 2011 22:47:05 +0000 (22:47 +0000)
commit32327650c5e7e73e392ae3b3a97d97650d4fb0af
tree3819f6277f910d4ce169bc9d80de7795b99f518e
parent59953d58097084cee2a9f09ab4aaea5d5a9a9dfd
clean up Html::inlineScript usage
* ResourceLoader::makeLoaderConditionalScript:
-- window.mediaWiki -> window.mw; Not just because it's shorter but because that's the variable that is actually being used inside the script.
* ProtectionForm::buildCleanupScript
-- Use a single quote string and no new line
-- Use ResourceLoader::makeLoaderConditionalScript instead of duplicating this logic everywhere
* ProtectionForm::buildCleanupScript:
-- Use Xml::encodeJsCall to render javascript code
-- Use ResourceLoader::makeLoaderConditionalScript
-- Fix bug 31230 by using the new OutputPage->addJsConfigVars( r98374 )
(had to use $wgOut for now since there wasn't an obvious route to a context that I could find here (Article has context, but ProtectionForm::__construct takes any WikiPage, not just Article)
* EditPage::getEditToolbar:
-- Use Xml::encodeJsCall
-- Use ResourceLoader::makeLoaderConditionalScript

Fixes:
* (bug 31230) ProtectionForm should set wgCascadeableLevels in mw.confg instead of globally
includes/EditPage.php
includes/ProtectionForm.php
includes/resourceloader/ResourceLoader.php