* (bug 2740) Accept image deletions on 'enter' submit from MSIE
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 16 Nov 2005 08:15:36 +0000 (08:15 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 16 Nov 2005 08:15:36 +0000 (08:15 +0000)
Confirmation checkbox is gone now; the submit button had been
coopted to replace it in the submission variables, but some
user agents don't go looking for a default button when you
submit by hitting 'enter' in a text entry widget. Just check
that the form was posted; we already have the edit token check
to confirm that it's not a forged request.

includes/ImagePage.php

index 1ab1c36..9531f24 100644 (file)
@@ -383,7 +383,7 @@ END
        {
                global $wgUser, $wgOut, $wgRequest;
 
-               $confirm = $wgRequest->getBool( 'wpConfirmB' );
+               $confirm = $wgRequest->wasPosted();
                $image = $wgRequest->getVal( 'image' );
                $oldimage = $wgRequest->getVal( 'oldimage' );