From b98d9efe7729fe8b7d97c27d8d64cf04a3a8a76e Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 5 Jul 2014 22:00:41 +0200 Subject: [PATCH] Remove deprecated Skin::makeGlobalVariablesScript And make OutputPage::getJSVars private per documentation. Also adjust some comments. Change-Id: Ia6484654754dd4782dda1d8c1e140cdb7a6f1115 --- RELEASE-NOTES-1.24 | 1 + docs/hooks.txt | 4 ++-- includes/OutputPage.php | 5 +---- includes/Skin.php | 15 --------------- includes/SkinTemplate.php | 2 +- 5 files changed, 5 insertions(+), 22 deletions(-) diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index 6e53a0c8b9..ed1b02e31a 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -215,6 +215,7 @@ changes to languages because of Bugzilla reports. set of hooks has been removed and replaced by a single new hook SpecialPageBeforeFormDisplay. * (bug 65781) Removed block warning on included {{Special:Contributions}} +* Removed Skin::makeGlobalVariablesScript. (deprecated since 1.19) ==== Renamed classes ==== * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression diff --git a/docs/hooks.txt b/docs/hooks.txt index b1ef47ca0d..eb4d4359f9 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1712,8 +1712,8 @@ $refreshLinks: RefreshLinks object 'MagicWordwgVariableIDs': When defining new magic words IDs. $variableIDs: array of strings -'MakeGlobalVariablesScript': Called right before Skin::makeVariablesScript is -executed. Ideally, this hook should only be used to add variables that depend on +'MakeGlobalVariablesScript': Called at end of OutputPage::getJSVars. +Ideally, this hook should only be used to add variables that depend on the current page/request; static configuration should be added through ResourceLoaderGetConfigVars instead. &$vars: variable (or multiple variables) to be added into the output of diff --git a/includes/OutputPage.php b/includes/OutputPage.php index f8b1b3ecd5..62f3c13c23 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3109,16 +3109,13 @@ $templates /** * Get an array containing the variables to be set in mw.config in JavaScript. * - * DO NOT CALL THIS FROM OUTSIDE OF THIS CLASS OR Skin::makeGlobalVariablesScript(). - * This is only public until that function is removed. You have been warned. - * * Do not add things here which can be evaluated in ResourceLoaderStartUpModule * - in other words, page-independent/site-wide variables (without state). * You will only be adding bloat to the html page and causing page caches to * have to be purged on configuration changes. * @return array */ - public function getJSVars() { + private function getJSVars() { global $wgContLang; $curRevisionId = 0; diff --git a/includes/Skin.php b/includes/Skin.php index 14cd7af34f..bc30eff4f1 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -421,21 +421,6 @@ abstract class Skin extends ContextSource { } } - /** - * Make a "