Again partial fix to bug 23167
Bugfix watch on creation (edit and upload), in current form, setting unwatch, or nochange would follow watchcreation, which wasn't requested
case 'preferences':
global $wgUser;
case 'preferences':
global $wgUser;
- if ( isset($titleObj)
- && $titleObj->exists()
- && $wgUser->getOption( 'watchdefault' )
- && !$titleObj->userIsWatching() ) {
- return true;
+ if ( isset($titleObj) && !$titleObj->userIsWatching() ) {
+ if ( $titleObj->exists() ) {
+ if ( $wgUser->getOption( 'watchdefault' ) ) {
+ return true;
+ }
+ } elseif ( $wgUser->getOption( 'watchcreations' ) ) {
+ return true;
+ }
$reqArr['wpSection'] = '';
}
$reqArr['wpSection'] = '';
}
- $watch = $this->getWatchlistValue( $params['watchlist'], $titleObj ) || $wgUser->getOption( 'watchcreations' );
+ $watch = $this->getWatchlistValue( $params['watchlist'], $titleObj );
// Deprecated parameters
if ( $params['watch'] ) {
// Deprecated parameters
if ( $params['watch'] ) {
}
$file = $this->mUpload->getLocalFile();
}
$file = $this->mUpload->getLocalFile();
- $watch = $this->getWatchlistValue( $params['watchlist'], $file->getTitle() ) || $wgUser->getOption( 'watchcreations' );
+ $watch = $this->getWatchlistValue( $params['watchlist'], $file->getTitle() );
// Deprecated parameters
if ( $this->mParams['watch'] ) {
// Deprecated parameters
if ( $this->mParams['watch'] ) {