Index: trunk/phase3/includes/SpecialUpload.php |
— | — | @@ -410,7 +410,8 @@ |
411 | 411 | $warning .= '<li>'.wfMsgHtml( 'emptyfile' ).'</li>'; |
412 | 412 | } |
413 | 413 | |
414 | | - if( $nt->getArticleID() ) { |
| 414 | + $image = new Image( $nt ); |
| 415 | + if( $image->exists() ) { |
415 | 416 | global $wgUser; |
416 | 417 | $sk = $wgUser->getSkin(); |
417 | 418 | $dlink = $sk->makeKnownLinkObj( $nt ); |
— | — | @@ -418,7 +419,6 @@ |
419 | 420 | } else { |
420 | 421 | # If the file existed before and was deleted, warn the user of this |
421 | 422 | # Don't bother doing so if the image exists now, however |
422 | | - $image = new Image( $nt ); |
423 | 423 | if( $image->wasDeleted() ) { |
424 | 424 | $skin = $wgUser->getSkin(); |
425 | 425 | $ltitle = SpecialPage::getTitleFor( 'Log' ); |