From 3c010d143e3041f19c85609a78d000a92814f091 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 25 Mar 2010 21:03:49 +0000 Subject: [PATCH] Minor tweak to performUpload in UploadBase.php Only do one call to $status->isGood() and nest if $watch check in that --- includes/upload/UploadBase.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 8e0f7a3ad7..94fda9b075 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -390,11 +390,11 @@ abstract class UploadBase { $status = $this->getLocalFile()->upload( $this->mTempPath, $comment, $pageText, File::DELETE_SOURCE, $this->mFileProps, false, $user ); - if( $status->isGood() && $watch ) { - $user->addWatch( $this->getLocalFile()->getTitle() ); - } - if( $status->isGood() ) { + if ( $watch ) { + $user->addWatch( $this->getLocalFile()->getTitle() ); + } + wfRunHooks( 'UploadComplete', array( &$this ) ); } -- 2.20.1