From: Aaron Schulz Date: Thu, 15 Mar 2007 15:39:51 +0000 (+0000) Subject: *Check $image->exists() rather that getArticleID() to avoid extraneous warning (bug... X-Git-Tag: 1.31.0-rc.0~53714 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=0307baefe3d32a2cdfa8e66aa4062b2479620ef3;p=lhc%2Fweb%2Fwiklou.git *Check $image->exists() rather that getArticleID() to avoid extraneous warning (bug 9019) --- diff --git a/includes/SpecialUpload.php b/includes/SpecialUpload.php index 0715ea04d1..fc75b15de3 100644 --- a/includes/SpecialUpload.php +++ b/includes/SpecialUpload.php @@ -410,7 +410,8 @@ class UploadForm { $warning .= '
  • '.wfMsgHtml( 'emptyfile' ).'
  • '; } - if( $nt->getArticleID() ) { + $image = new Image( $nt ); + if( $image->exists() ) { global $wgUser; $sk = $wgUser->getSkin(); $dlink = $sk->makeKnownLinkObj( $nt ); @@ -418,7 +419,6 @@ class UploadForm { } else { # If the file existed before and was deleted, warn the user of this # Don't bother doing so if the image exists now, however - $image = new Image( $nt ); if( $image->wasDeleted() ) { $skin = $wgUser->getSkin(); $ltitle = SpecialPage::getTitleFor( 'Log' );