UploadBase: Return 'was-deleted' warning in addition to 'exists-normalized', not...
authorBartosz Dziewoński <matma.rex@gmail.com>
Fri, 11 Sep 2015 18:49:36 +0000 (20:49 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 12 Oct 2015 12:22:11 +0000 (14:22 +0200)
commitf90c0659a9170dc2eeb0bc05768125224de850cf
tree61d2c7bdca1d986076c3141ad21d16031bec16d6
parent63016a107324acdd2fbeb203aa8a2fc44a6fb9ba
UploadBase: Return 'was-deleted' warning in addition to 'exists-normalized', not instead of

The 'was-deleted' warning was generated by getExistsWarning(), which
was returning immediately if this was found to be the case. A bunch of
later checks were incorrectly skipped, in particular 'exists-normalized',
which was resulting in UploadWizard incorrectly ignoring that problem.

I'm not sure why that was part of getExistsWarning() at all, it
doesn't seem very relevant. For that matter, neither do the 'thumb',
'thumb-name' and 'bad-prefix' warnings that it also generates, but
this should not be a problem in practice and so I'm leaving them alone.

Other than by allowing some more warning types to appear together or
in different order, this should not affect action=upload API output or
Special:Upload (which was updated appropriately). It does affect
'action=query&prop=imageinfo' output's 'html' property (used for AJAX
checks on Special:Upload), which no longer includes the 'was-deleted'
warning; this was never specified anywhere and just a side-effect.

Bug: T48741
Change-Id: I3686ee8ffd635f5f06f51971b6f16e3e66f33a9e
RELEASE-NOTES-1.27
includes/specials/SpecialUpload.php
includes/upload/UploadBase.php