https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112184

Revision: 112184
Author:   krinkle
Date:     2012-02-23 02:45:45 +0000 (Thu, 23 Feb 2012)
Log Message:
-----------
Bug 34604 - [mw.config] wgActionPaths should be an object instead of a numeral 
array JavaScript

Modified Paths:
--------------
    trunk/phase3/RELEASE-NOTES-1.19
    trunk/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php

Modified: trunk/phase3/RELEASE-NOTES-1.19
===================================================================
--- trunk/phase3/RELEASE-NOTES-1.19     2012-02-23 02:43:57 UTC (rev 112183)
+++ trunk/phase3/RELEASE-NOTES-1.19     2012-02-23 02:45:45 UTC (rev 112184)
@@ -245,6 +245,8 @@
   around a bug where not all styles were applied in Internet Explorer
 * (bug 28936, bug 5280) Broken or invalid titles can't be removed from 
watchlist.
 * (bug 34600) Older skins using useHeadElement=false were broken in 1.18
+* (bug 34604) [mw.config] wgActionPaths should be an object instead of a 
numeral
+  array.
 
 === API changes in 1.19 ===
 * Made action=edit less likely to return "unknownerror", by returning the 
actual error

Modified: trunk/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php
===================================================================
--- trunk/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php        
2012-02-23 02:43:57 UTC (rev 112183)
+++ trunk/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php        
2012-02-23 02:45:45 UTC (rev 112184)
@@ -68,7 +68,9 @@
                        'wgScriptExtension' => $wgScriptExtension,
                        'wgScript' => $wgScript,
                        'wgVariantArticlePath' => $wgVariantArticlePath,
-                       'wgActionPaths' => $wgActionPaths,
+                       // Force object to avoid "empty" associative array from
+                       // becoming [] instead of {} in JS (bug 34604)
+                       'wgActionPaths' => (object)$wgActionPaths,
                        'wgServer' => $wgServer,
                        'wgUserLanguage' => $context->getLanguage(),
                        'wgContentLanguage' => $wgContLang->getCode(),


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to