r20490 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r20489‎ | r20490 | r20491 >
Date:15:39, 15 March 2007
Author:aaron
Status:old
Tags:
Comment:
*Check $image->exists() rather that getArticleID() to avoid extraneous warning (bug 9019)
Modified paths:
  • /trunk/phase3/includes/SpecialUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUpload.php
@@ -410,7 +410,8 @@
411411 $warning .= '<li>'.wfMsgHtml( 'emptyfile' ).'</li>';
412412 }
413413
414 - if( $nt->getArticleID() ) {
 414+ $image = new Image( $nt );
 415+ if( $image->exists() ) {
415416 global $wgUser;
416417 $sk = $wgUser->getSkin();
417418 $dlink = $sk->makeKnownLinkObj( $nt );
@@ -418,7 +419,6 @@
419420 } else {
420421 # If the file existed before and was deleted, warn the user of this
421422 # Don't bother doing so if the image exists now, however
422 - $image = new Image( $nt );
423423 if( $image->wasDeleted() ) {
424424 $skin = $wgUser->getSkin();
425425 $ltitle = SpecialPage::getTitleFor( 'Log' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r20506* Update German translations and messages.inc...raymond08:03, 16 March 2007