https://bugzilla.wikimedia.org/show_bug.cgi?id=31233
Web browser: ---
Bug #: 31233
Summary: Make OutputPage's mw.config array extendable
internally instead of hard coded
Product: MediaWiki
Version: 1.18
Platform: All
OS/Version: All
Status: ASSIGNED
Severity: enhancement
Priority: Unprioritized
Component: Javascript
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
MediaWiki has two queues for mw.config variables. A site-wide set defined and
outputted by ResourceLoader's startup module (i.e. wgSiteName, wgLoadScript,
wgScriptPath, etc.). And one that is page specific (skin, wgPageName,
wgUserName etc.).
The latter is hardcoded in OutputPage->getJSVars. Although it can be extended
by extensions through the MakeGlobalVariablesScript, it's still annoying to
have to define these variables in the hooks file instead of in, for example,
the SpecialPage class itself. Another problem is access to the current
context's Title object. I added $out to the hook in r96015 (which has
getTitle()) but that only makes it a little but nicer.
the hard coded array should be an object member that can be extended via an
add*() method. That way a SpecialPage (or for example ProtectionForm - poke
bug 31230), can simply do $out->addThingy('wgFoo, 'bar')
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l