Index: trunk/phase3/includes/api/ApiWatch.php |
— | — | @@ -53,17 +53,17 @@ |
54 | 54 | $this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) ); |
55 | 55 | } |
56 | 56 | |
57 | | - $article = new Article( $title ); |
| 57 | + $article = new Article( $title, 0 ); |
58 | 58 | $res = array( 'title' => $title->getPrefixedText() ); |
59 | 59 | |
60 | 60 | if ( $params['unwatch'] ) { |
61 | 61 | $res['unwatched'] = ''; |
62 | 62 | $res['message'] = wfMsgExt( 'removedwatchtext', array( 'parse' ), $title->getPrefixedText() ); |
63 | | - $success = WatchAction::doWatch( $title, $wgUser ); |
| 63 | + $success = WatchAction::doUnwatch( $title, $wgUser ); |
64 | 64 | } else { |
65 | 65 | $res['watched'] = ''; |
66 | 66 | $res['message'] = wfMsgExt( 'addedwatchtext', array( 'parse' ), $title->getPrefixedText() ); |
67 | | - $success = UnwatchAction::doUnwatch( $title, $wgUser ); |
| 67 | + $success = UnwatchAction::doWatch( $title, $wgUser ); |
68 | 68 | } |
69 | 69 | if ( !$success ) { |
70 | 70 | $this->dieUsageMsg( 'hookaborted' ); |