Remove deprecated Skin::makeGlobalVariablesScript

And make OutputPage::getJSVars private per documentation.
Also adjust some comments.

Change-Id: Ia6484654754dd4782dda1d8c1e140cdb7a6f1115
This commit is contained in:
umherirrender 2014-07-05 22:00:41 +02:00 committed by Krinkle
parent 990619c60d
commit b98d9efe77
5 changed files with 5 additions and 22 deletions

View file

@ -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

View file

@ -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

View file

@ -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;

View file

@ -421,21 +421,6 @@ abstract class Skin extends ContextSource {
}
}
/**
* 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
*

View file

@ -1097,7 +1097,7 @@ class SkinTemplate extends Skin {
/**
* 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