Page MenuHomePhabricator

OGG and OGV are listed twice as "Permitted file types" on Special:Upload
Closed, ResolvedPublic

Description

Error is present in both Wikipedia and at Commons, e. g. https://en.wikipedia.org/wiki/Special:Upload


Version: 1.22.0
Severity: trivial

Details

Reference
bz54378

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:04 AM
bzimport set Reference to bz54378.
bzimport added a subscriber: Unknown Object (MLST).

Thanks for taking the time to report this! Confirming.

I wonder if that happens because once it refers to audio, and once to video.

$:andre\> grep -r "Permitted file types" .
./languages/messages/MessagesEn.php:

'upload-permitted'            => 'Permitted file types: $1.',

$:andre\> grep -r "upload-permitted" .
./includes/specials/SpecialUpload.php:

$this->msg( 'upload-permitted', $this->getContext()->getLanguage()->commaList( $wgFileExtensions ) )->parseAsBlock() .

Its because its added to $wgFileExtensions both in our LocalSettings, and in the setup code for TMH.

Solution would be to run array_unique on $wgFileExtensions before outputting it.

Change 86021 had a related patch set uploaded by Brion VIBBER:
bug 54378: remove duplicate file extensions from output messages

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

Change 86021 had a related patch set uploaded by Krinkle:
bug 54378: remove duplicate file extensions from output messages

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

Change 86021 merged by jenkins-bot:
Remove duplicate file extensions from output messages

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