Page MenuHomePhabricator

"Cancel upload" on Special:Upload shouldn't check "ignore any warnings" button
Closed, ResolvedPublic

Description

Author: rockmfr

Description:
On the upload warning page for Special:Upload, clicking "Cancel upload and return to the upload form" should not result in the "Ignore any warnings" checkbox being checked. Just because the user sees one warning doesn't mean they shouldn't get any more!

There are three legitimate ways that I see to fix this:

  1. When checking $this->mReUpload, if it is true, then set $this->mIgnoreWarning to false.
  2. Split the form on the upload warning page into two forms: one for the ignore warning button and one for the cancel upload button.
  3. Have the ignore warning button on the upload warning page use something else besides wpUpload (i.e., wpUploadNoWarnings).

Version: unspecified
Severity: normal

Details

Reference
bz14551

Event Timeline

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

rockmfr wrote:

Special:Upload patch (option 1)

Going with option #1 as it is the easiest...

Attached:

Done in r36317.

I did it slightly different. Instead, I took the value of $this->mIgnoreWarning as a value for future warnings.

rockmfr wrote:

Actually, I don't think that will work. Because the rest of the code treats it as a checkbox, it is considered true if a value is submitted at all, even if it is just empty.

What about:

$uploadWarningBool = 0
if ( $this->mIgnoreWarnings ) $uploadWarningBool = 1;
...
...
Xml::hidden( 'wpIgnoreWarning', $uploadWarningBool ) . "\n" .

rockmfr wrote:

Nope, because it doesn't matter what the previous setting of mIgnoreWarnings was once you get to the warning page. At that point, it will be false all the time.

You're right, I was trying to overthink it. Done in r36318 by your original patch.