Page MenuHomePhabricator

Setting $wgStrictFileExtensions to false gives incorrect warning
Closed, ResolvedPublic


Author: mediawiki

... The warning in question is for example

".txt" is an unwanted file type. Preferred file types are $2.

Note the $2.

Version: 1.16.x
Severity: minor



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:29 PM
bzimport set Reference to bz29325.
bzimport added a subscriber: Unknown Object (MLST).

Confirmed still present in trunk.

Looks like the warning message gets set in UploadBase::checkWarnings(), but parameters for those messages don't get added until output time in SpecialUpload::showUploadWarning.

That function has some special cases for specific warning messages to customize the output; the one to watch for is 'filetype-unwanted-type'.

The similar 'filetype-banned-type' message is processed separately in SpecialUpload::processVerificationError, so may need some common list building.