From 0307baefe3d32a2cdfa8e66aa4062b2479620ef3 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 15 Mar 2007 15:39:51 +0000 Subject: [PATCH] *Check $image->exists() rather that getArticleID() to avoid extraneous warning (bug 9019) --- includes/SpecialUpload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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' ); -- 2.20.1