http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90041
Revision: 90041
Author: nikerabbit
Date: 2011-06-14 13:10:26 +0000 (Tue, 14 Jun 2011)
Log Message:
-----------
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: trunk/phase3/includes/api/ApiWatch.php
===================================================================
--- trunk/phase3/includes/api/ApiWatch.php 2011-06-14 13:02:05 UTC (rev
90040)
+++ trunk/phase3/includes/api/ApiWatch.php 2011-06-14 13:10:26 UTC (rev
90041)
@@ -53,17 +53,17 @@
$this->dieUsageMsg( array( 'invalidtitle',
$params['title'] ) );
}
- $article = new Article( $title );
+ $article = new Article( $title, 0 );
$res = array( 'title' => $title->getPrefixedText() );
if ( $params['unwatch'] ) {
$res['unwatched'] = '';
$res['message'] = wfMsgExt( 'removedwatchtext', array(
'parse' ), $title->getPrefixedText() );
- $success = WatchAction::doWatch( $title, $wgUser );
+ $success = WatchAction::doUnwatch( $title, $wgUser );
} else {
$res['watched'] = '';
$res['message'] = wfMsgExt( 'addedwatchtext', array(
'parse' ), $title->getPrefixedText() );
- $success = UnwatchAction::doUnwatch( $title, $wgUser );
+ $success = UnwatchAction::doWatch( $title, $wgUser );
}
if ( !$success ) {
$this->dieUsageMsg( 'hookaborted' );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs