From 586aeca9cf0843fe0877bac51ec9eeccac67389f Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Mon, 14 Nov 2011 14:36:06 +0000 Subject: [PATCH] Add Platonides' "add wlexcludeuser to feedwatchlist" patch from bug 25325 --- RELEASE-NOTES-1.19 | 1 + includes/api/ApiFeedWatchlist.php | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 712f6c5b4f..acdaff6a74 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -149,6 +149,7 @@ production. * (bug 30591) Add support to only return keys in ApiAllMessages. * The API now respects $wgShowHostnames and won't share the hostname in severedby if it's set to false +* wlexcludeuser parameter added to ApiFeedWatchlist === Languages updated in 1.19 === diff --git a/includes/api/ApiFeedWatchlist.php b/includes/api/ApiFeedWatchlist.php index e77a08cb49..36b0ba9200 100644 --- a/includes/api/ApiFeedWatchlist.php +++ b/includes/api/ApiFeedWatchlist.php @@ -70,6 +70,9 @@ class ApiFeedWatchlist extends ApiBase { if( !isset( $wgFeedClasses[ $params['feedformat'] ] ) ) { $this->dieUsage( 'Invalid subscription feed type', 'feed-invalid' ); } + if ( !is_null( $params['wlexcludeuser'] ) ) { + $fauxReqArr['wlexcludeuser'] = $params['wlexcludeuser']; + } // limit to the number of hours going from now back $endTime = wfTimestamp( TS_MW, time() - intval( $params['hours'] * 60 * 60 ) ); @@ -194,6 +197,9 @@ class ApiFeedWatchlist extends ApiBase { 'wltoken' => array( ApiBase::PARAM_TYPE => 'string' ), + 'wlexcludeuser' => array( + ApiBase::PARAM_TYPE => 'user' + ), 'linktodiffs' => false, ); } @@ -203,9 +209,10 @@ class ApiFeedWatchlist extends ApiBase { 'feedformat' => 'The format of the feed', 'hours' => 'List pages modified within this many hours from now', 'allrev' => 'Include multiple revisions of the same page within given timeframe', - 'wlowner' => "The user whose watchlist you want (must be accompanied by {$this->getModulePrefix()}token if it's not you)", + 'wlowner' => "The user whose watchlist you want (must be accompanied by {$this->getModulePrefix()}wltoken if it's not you)", 'wltoken' => 'Security token that requested user set in their preferences', - 'linktodiffs' => 'Link to change differences instead of article pages' + 'wlexcludeuser' => 'A user whose edits should not be shown in the watchlist', + 'linktodiffs' => 'Link to change differences instead of article pages', ); } -- 2.20.1