http://www.mediawiki.org/wiki/Special:Code/MediaWiki/64198
Revision: 64198 Author: reedy Date: 2010-03-25 22:31:41 +0000 (Thu, 25 Mar 2010) Log Message: ----------- 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: trunk/phase3/includes/api/ApiUpload.php =================================================================== --- trunk/phase3/includes/api/ApiUpload.php 2010-03-25 22:15:08 UTC (rev 64197) +++ trunk/phase3/includes/api/ApiUpload.php 2010-03-25 22:31:41 UTC (rev 64198) @@ -236,8 +236,13 @@ $this->dieUsage( 'An internal error occurred', 'internal-error', 0, $error ); } - + $file = $this->mUpload->getLocalFile(); + + if ( !$watch ) { + $wgUser->removeWatch( $file->getTitle() ); + } + $result['result'] = 'Success'; $result['filename'] = $file->getName(); $result['imageinfo'] = $this->mUpload->getImageInfo( $this->getResult() ); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs