* (bug 32702) Fix for r82273: readded Skin::makeGlobalVariablesScript() for backward...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 29 Dec 2011 20:39:29 +0000 (20:39 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 29 Dec 2011 20:39:29 +0000 (20:39 +0000)
RELEASE-NOTES-1.19
includes/OutputPage.php
includes/Skin.php

index c75295d..5e39e81 100644 (file)
@@ -199,6 +199,8 @@ production.
 * (bug 31719) Recognize &ns_svg; as the svg namespace when extracting width
 * (bug 30914) Embeddable ResourceLoader modules (user.options, user.tokens)
   should be loaded in <head> for proper dependency resolution
+* (bug 32702) Removed method Skin::makeGlobalVariablesScript() has been readded
+  for backward compatibility
 
 === API changes in 1.19 ===
 * (bug 19838) siprop=interwikimap can now use the interwiki cache.
index 7b8d4cd..c83401f 100644 (file)
@@ -2767,13 +2767,16 @@ $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 ResourceLoaderStartupScript
         * - 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
         */
-       protected function getJSVars() {
+       public function getJSVars() {
                global $wgUseAjax, $wgEnableMWSuggest;
 
                $title = $this->getTitle();
index 0416112..9ecb615 100644 (file)
@@ -301,6 +301,21 @@ abstract class Skin extends ContextSource {
                }
        }
 
+       /**
+        * Make a <script> tag containing global variables
+        *
+        * @deprecated in 1.19
+        * @param $unused 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
         *