* Do, what the comment already says:
authorRaimond Spekking <raymond@users.mediawiki.org>
Mon, 1 Oct 2007 14:10:02 +0000 (14:10 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Mon, 1 Oct 2007 14:10:02 +0000 (14:10 +0000)
Don't bother the user with a warning about a previously deleted file if the file exists now, however.

includes/SpecialUpload.php

index 30fdc3c..31e2be1 100644 (file)
@@ -639,9 +639,9 @@ class UploadForm {
                        }
                }
 
-               if ( $file->wasDeleted() ) {
+               if ( $file->wasDeleted() && !$file->exists() ) {
                        # If the file existed before and was deleted, warn the user of this
-                       # Don't bother doing so if the image exists now, however
+                       # Don't bother doing so if the file exists now, however
                        $ltitle = SpecialPage::getTitleFor( 'Log' );
                        $llink = $sk->makeKnownLinkObj( $ltitle, wfMsgHtml( 'deletionlog' ), 
                                'type=delete&page=' . $file->getTitle()->getPrefixedUrl() );