r107595 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107594‎ | r107595 | r107596 >
Date:20:39, 29 December 2011
Author:ialex
Status:ok
Tags:
Comment:
* (bug 32702) Fix for r82273: readded Skin::makeGlobalVariablesScript() for backward compatibility and marked it as deprecated
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -199,6 +199,8 @@
200200 * (bug 31719) Recognize &ns_svg; as the svg namespace when extracting width
201201 * (bug 30914) Embeddable ResourceLoader modules (user.options, user.tokens)
202202 should be loaded in <head> for proper dependency resolution
 203+* (bug 32702) Removed method Skin::makeGlobalVariablesScript() has been readded
 204+ for backward compatibility
203205
204206 === API changes in 1.19 ===
205207 * (bug 19838) siprop=interwikimap can now use the interwiki cache.
Index: trunk/phase3/includes/Skin.php
@@ -302,6 +302,21 @@
303303 }
304304
305305 /**
 306+ * Make a <script> tag containing global variables
 307+ *
 308+ * @deprecated in 1.19
 309+ * @param $unused Unused
 310+ * @return string HTML fragment
 311+ */
 312+ public static function makeGlobalVariablesScript( $unused ) {
 313+ global $wgOut;
 314+
 315+ wfDeprecated( __METHOD__, '1.19' );
 316+
 317+ return self::makeVariablesScript( $wgOut->getJSVars() );
 318+ }
 319+
 320+ /**
306321 * Get the query to generate a dynamic stylesheet
307322 *
308323 * @return array
Index: trunk/phase3/includes/OutputPage.php
@@ -2767,13 +2767,16 @@
27682768 /**
27692769 * Get an array containing the variables to be set in mw.config in JavaScript.
27702770 *
 2771+ * DO NOT CALL THIS FROM OUTSIDE OF THIS CLASS OR Skin::makeGlobalVariablesScript().
 2772+ * This is only public until that function is removed. You have been warned.
 2773+ *
27712774 * Do not add things here which can be evaluated in ResourceLoaderStartupScript
27722775 * - in other words, page-independent/site-wide variables (without state).
27732776 * You will only be adding bloat to the html page and causing page caches to
27742777 * have to be purged on configuration changes.
27752778 * @return array
27762779 */
2777 - protected function getJSVars() {
 2780+ public function getJSVars() {
27782781 global $wgUseAjax, $wgEnableMWSuggest;
27792782
27802783 $title = $this->getTitle();

Follow-up revisions

RevisionCommit summaryAuthorDate
r107898MFT r107595...reedy16:54, 3 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82273Moved Skin::makeGlobalVariablesScript() to OutputPage::getJSVars()...ialex18:25, 16 February 2011

Status & tagging log