And make OutputPage::getJSVars private per documentation.
Also adjust some comments.
Change-Id: Ia6484654754dd4782dda1d8c1e140cdb7a6f1115
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
'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
/**
* 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;
}
}
- /**
- * Make a "<script>" tag containing global variables
- *
- * @deprecated since 1.19
- * @param mixed $unused
- * @return string HTML fragment
- */
- public static function makeGlobalVariablesScript( $unused ) {
- global $wgOut;
-
- wfDeprecated( __METHOD__, '1.19' );
-
- return self::makeVariablesScript( $wgOut->getJSVars() );
- }
-
/**
* Get the query to generate a dynamic stylesheet
*
/**
* The following actions use messages which, if made particular to
* the any specific skins, would break the Ajax code which makes this
- * action happen entirely inline. Skin::makeGlobalVariablesScript
+ * action happen entirely inline. OutputPage::getJSVars
* defines a set of messages in a javascript object - and these
* messages are assumed to be global for all skins. Without making
* a change to that procedure these messages will have to remain as