r64198 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64197‎ | r64198 | r64199 >
Date:22:31, 25 March 2010
Author:reedy
Status:reverted (Comments)
Tags:
Comment:
Minor followup to r64197

Allow unwatch via ApiUpload, UploadBase doesn't allow/cater for unwatching, so use the $wgUser object to do it, rather than possibly causing a breaking change in UploadBase
Modified paths:
  • /trunk/phase3/includes/api/ApiUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiUpload.php
@@ -236,8 +236,13 @@
237237
238238 $this->dieUsage( 'An internal error occurred', 'internal-error', 0, $error );
239239 }
240 -
 240+
241241 $file = $this->mUpload->getLocalFile();
 242+
 243+ if ( !$watch ) {
 244+ $wgUser->removeWatch( $file->getTitle() );
 245+ }
 246+
242247 $result['result'] = 'Success';
243248 $result['filename'] = $file->getName();
244249 $result['imageinfo'] = $this->mUpload->getImageInfo( $this->getResult() );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r64197Fix bug 22944 in a much better fashion (using watchlist parameter)...reedy22:15, 25 March 2010

Comments

#Comment by Reedy (talk | contribs)   08:57, 7 April 2010

Marking as reverted (was during mass better fix for this)

Status & tagging log