dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa4ca02
)
Minor tweak to performUpload in UploadBase.php
author
Sam Reed
<reedy@users.mediawiki.org>
Thu, 25 Mar 2010 21:03:49 +0000
(21:03 +0000)
committer
Sam Reed
<reedy@users.mediawiki.org>
Thu, 25 Mar 2010 21:03:49 +0000
(21:03 +0000)
Only do one call to $status->isGood() and nest if $watch check in that
includes/upload/UploadBase.php
patch
|
blob
|
history
diff --git
a/includes/upload/UploadBase.php
b/includes/upload/UploadBase.php
index
8e0f7a3
..
94fda9b
100644
(file)
--- 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 ) );
}