r64958 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64957‎ | r64958 | r64959 >
Date:10:44, 12 April 2010
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Revert r64955

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
Modified paths:
  • /trunk/phase3/includes/api/ApiBase.php (modified) (history)
  • /trunk/phase3/includes/api/ApiEditPage.php (modified) (history)
  • /trunk/phase3/includes/api/ApiUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiEditPage.php
@@ -202,7 +202,7 @@
203203 $reqArr['wpSection'] = '';
204204 }
205205
206 - $watch = $this->getWatchlistValue( $params['watchlist'], $titleObj ) || $wgUser->getOption( 'watchcreations' );
 206+ $watch = $this->getWatchlistValue( $params['watchlist'], $titleObj );
207207
208208 // Deprecated parameters
209209 if ( $params['watch'] ) {
Index: trunk/phase3/includes/api/ApiBase.php
@@ -551,11 +551,14 @@
552552
553553 case 'preferences':
554554 global $wgUser;
555 - if ( isset($titleObj)
556 - && $titleObj->exists()
557 - && $wgUser->getOption( 'watchdefault' )
558 - && !$titleObj->userIsWatching() ) {
559 - return true;
 555+ if ( isset($titleObj) && !$titleObj->userIsWatching() ) {
 556+ if ( $titleObj->exists() ) {
 557+ if ( $wgUser->getOption( 'watchdefault' ) ) {
 558+ return true;
 559+ }
 560+ } elseif ( $wgUser->getOption( 'watchcreations' ) ) {
 561+ return true;
 562+ }
560563 }
561564 return null;
562565
Index: trunk/phase3/includes/api/ApiUpload.php
@@ -248,7 +248,7 @@
249249 }
250250
251251 $file = $this->mUpload->getLocalFile();
252 - $watch = $this->getWatchlistValue( $params['watchlist'], $file->getTitle() ) || $wgUser->getOption( 'watchcreations' );
 252+ $watch = $this->getWatchlistValue( $params['watchlist'], $file->getTitle() );
253253
254254 // Deprecated parameters
255255 if ( $this->mParams['watch'] ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r64963RELEASE-NOTES for bug 23167 r64957 and r94958reedy15:56, 12 April 2010
r65684MFT r64957, bug 23167: respect the watchcreations user preference on uploadtstarling06:36, 30 April 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r64955Partial fix to bug 23167...reedy10:23, 12 April 2010
r64957(bug 23167) Check the watch checkbox by default if the watchcreations prefere...btongminh10:40, 12 April 2010

Comments

#Comment by Tim Starling (talk | contribs)   06:32, 30 April 2010

It's not trivial to backport this to 1.16, there's no getWatchlistValue() in it. If we want a backport for this, then it'll need to be rewritten and tested.

#Comment by RobLa (talk | contribs)   17:18, 14 July 2010

Given the complexity of backporting this, seems like we should allow a regression here, and work toward making the 1.17 cycle reasonably short. If someone does backport it after release, we can always include it in a dot release.

Status & tagging log