Page MenuHomePhabricator

mw.config variables for use in mediawiki.ForeignUpload should use package files
Closed, ResolvedPublic

Description

Currently, on all responses mw.config includes configuration variables wgForeignUploadTargets and wgEnableUploads. These are documented[1] as being

@internal For mediawiki.ForeignUpload

We should switch to providing them via package files instead, so that they are only loaded when the mediawiki.Title module is used. There is a single use in JavaScript outside of mediawiki.ForeignUpload, in the TinyMCE extension (uses wgEnableUploads, not deployed), so we can add an entry in the release notes about the removal.

[1] https://gerrit.wikimedia.org/g/mediawiki/core/+/3ff9183d2453413e7c8c550232918d11cfd1eb1b/includes/resourceloader/ResourceLoader.php#1987

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 724383 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] Move mediawiki.ForeignUpload configuration settings to package files

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

Change 724383 merged by jenkins-bot:

[mediawiki/core@master] Move mediawiki.ForeignUpload configuration settings to package files

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