r90041 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90040‎ | r90041 | r90042 >
Date:13:10, 14 June 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
FU r89545: change broke api watching by switching watch and unwatch around.
Also added zero to the article constructor..how many subtle bugs we need to make default article constructor sane?
Modified paths:
  • /trunk/phase3/includes/api/ApiWatch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiWatch.php
@@ -53,17 +53,17 @@
5454 $this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) );
5555 }
5656
57 - $article = new Article( $title );
 57+ $article = new Article( $title, 0 );
5858 $res = array( 'title' => $title->getPrefixedText() );
5959
6060 if ( $params['unwatch'] ) {
6161 $res['unwatched'] = '';
6262 $res['message'] = wfMsgExt( 'removedwatchtext', array( 'parse' ), $title->getPrefixedText() );
63 - $success = WatchAction::doWatch( $title, $wgUser );
 63+ $success = WatchAction::doUnwatch( $title, $wgUser );
6464 } else {
6565 $res['watched'] = '';
6666 $res['message'] = wfMsgExt( 'addedwatchtext', array( 'parse' ), $title->getPrefixedText() );
67 - $success = UnwatchAction::doUnwatch( $title, $wgUser );
 67+ $success = UnwatchAction::doWatch( $title, $wgUser );
6868 }
6969 if ( !$success ) {
7070 $this->dieUsageMsg( 'hookaborted' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r94629Followup r90041: keep naming of watch and unwatch calls consistentcatrope12:46, 16 August 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89545WatchAction requires token (BREAKING CHANGE)...krinkle00:09, 6 June 2011

Status & tagging log