Remove deprecated Skin::makeGlobalVariablesScript
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 5 Jul 2014 20:00:41 +0000 (22:00 +0200)
committerKrinkle <krinklemail@gmail.com>
Tue, 8 Jul 2014 22:26:47 +0000 (22:26 +0000)
And make OutputPage::getJSVars private per documentation.
Also adjust some comments.

Change-Id: Ia6484654754dd4782dda1d8c1e140cdb7a6f1115

RELEASE-NOTES-1.24
docs/hooks.txt
includes/OutputPage.php
includes/Skin.php
includes/SkinTemplate.php

index 6e53a0c..ed1b02e 100644 (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
index b1ef47c..eb4d435 100644 (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
index f8b1b3e..62f3c13 100644 (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;
index 14cd7af..bc30eff 100644 (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
         *
index 5f827e8..97c0ec4 100644 (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