Partial fix to bug 23167
authorSam Reed <reedy@users.mediawiki.org>
Mon, 12 Apr 2010 10:23:09 +0000 (10:23 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 12 Apr 2010 10:23:09 +0000 (10:23 +0000)
Api doesn't watch new file on upload (and didn't previously). Now watches on creation

includes/api/ApiUpload.php

index f81ea24..3469133 100644 (file)
@@ -248,7 +248,7 @@ class ApiUpload extends ApiBase {
                }
 
                $file = $this->mUpload->getLocalFile();
-               $watch = $this->getWatchlistValue( $params['watchlist'], $file->getTitle() );
+               $watch = $this->getWatchlistValue( $params['watchlist'], $file->getTitle() ) || $wgUser->getOption( 'watchcreations' );
 
                // Deprecated parameters
                if ( $this->mParams['watch'] ) {