Page MenuHomePhabricator

WikibaseMediaInfo should not export unprefixed config/globals in JavaScript
Closed, ResolvedPublic

Description

maxCaptionLength

parsedMessageAnonEditWarning

userCanEdit

And as of last month, also:

protectionMsg

These are far too generic to be exported without any prefixed relating to MediaWiki, Wikibase, or WikibaseMediaInfo. This is problematic within mw.config itself, but even more so because they also become global variables.

Probably easiest to consolidate them under a single, prefixed, key, such wgWbMediaInfo or something like that.

Event Timeline

Mholloway renamed this task from WikimediaMediaInfo should not export unprefixed config/globals in JavaScript to WikibaseMediaInfo should not export unprefixed config/globals in JavaScript.Oct 7 2019, 4:27 PM

Change 541902 had a related patch set uploaded (by Anne Tomasevich; owner: Anne Tomasevich):
[mediawiki/extensions/WikibaseMediaInfo@master] Add extension-specific prefix to global JavaScript variables

https://gerrit.wikimedia.org/r/541902

Change 541902 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Add extension-specific prefix to global JavaScript variables

https://gerrit.wikimedia.org/r/541902