Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -199,6 +199,8 @@ |
200 | 200 | * (bug 31719) Recognize &ns_svg; as the svg namespace when extracting width |
201 | 201 | * (bug 30914) Embeddable ResourceLoader modules (user.options, user.tokens) |
202 | 202 | should be loaded in <head> for proper dependency resolution |
| 203 | +* (bug 32702) Removed method Skin::makeGlobalVariablesScript() has been readded |
| 204 | + for backward compatibility |
203 | 205 | |
204 | 206 | === API changes in 1.19 === |
205 | 207 | * (bug 19838) siprop=interwikimap can now use the interwiki cache. |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -302,6 +302,21 @@ |
303 | 303 | } |
304 | 304 | |
305 | 305 | /** |
| 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 | + /** |
306 | 321 | * Get the query to generate a dynamic stylesheet |
307 | 322 | * |
308 | 323 | * @return array |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -2767,13 +2767,16 @@ |
2768 | 2768 | /** |
2769 | 2769 | * Get an array containing the variables to be set in mw.config in JavaScript. |
2770 | 2770 | * |
| 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 | + * |
2771 | 2774 | * Do not add things here which can be evaluated in ResourceLoaderStartupScript |
2772 | 2775 | * - in other words, page-independent/site-wide variables (without state). |
2773 | 2776 | * You will only be adding bloat to the html page and causing page caches to |
2774 | 2777 | * have to be purged on configuration changes. |
2775 | 2778 | * @return array |
2776 | 2779 | */ |
2777 | | - protected function getJSVars() { |
| 2780 | + public function getJSVars() { |
2778 | 2781 | global $wgUseAjax, $wgEnableMWSuggest; |
2779 | 2782 | |
2780 | 2783 | $title = $this->getTitle(); |