r102987 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102986‎ | r102987 | r102988 >
Date:14:36, 14 November 2011
Author:reedy
Status:ok
Tags:
Comment:
Add Platonides' "add wlexcludeuser to feedwatchlist" patch from bug 25325
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/api/ApiFeedWatchlist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -149,6 +149,7 @@
150150 * (bug 30591) Add support to only return keys in ApiAllMessages.
151151 * The API now respects $wgShowHostnames and won't share the hostname in
152152 severedby if it's set to false
 153+* wlexcludeuser parameter added to ApiFeedWatchlist
153154
154155 === Languages updated in 1.19 ===
155156
Index: trunk/phase3/includes/api/ApiFeedWatchlist.php
@@ -70,6 +70,9 @@
7171 if( !isset( $wgFeedClasses[ $params['feedformat'] ] ) ) {
7272 $this->dieUsage( 'Invalid subscription feed type', 'feed-invalid' );
7373 }
 74+ if ( !is_null( $params['wlexcludeuser'] ) ) {
 75+ $fauxReqArr['wlexcludeuser'] = $params['wlexcludeuser'];
 76+ }
7477
7578 // limit to the number of hours going from now back
7679 $endTime = wfTimestamp( TS_MW, time() - intval( $params['hours'] * 60 * 60 ) );
@@ -194,6 +197,9 @@
195198 'wltoken' => array(
196199 ApiBase::PARAM_TYPE => 'string'
197200 ),
 201+ 'wlexcludeuser' => array(
 202+ ApiBase::PARAM_TYPE => 'user'
 203+ ),
198204 'linktodiffs' => false,
199205 );
200206 }
@@ -203,9 +209,10 @@
204210 'feedformat' => 'The format of the feed',
205211 'hours' => 'List pages modified within this many hours from now',
206212 'allrev' => 'Include multiple revisions of the same page within given timeframe',
207 - 'wlowner' => "The user whose watchlist you want (must be accompanied by {$this->getModulePrefix()}token if it's not you)",
 213+ 'wlowner' => "The user whose watchlist you want (must be accompanied by {$this->getModulePrefix()}wltoken if it's not you)",
208214 'wltoken' => 'Security token that requested user set in their preferences',
209 - 'linktodiffs' => 'Link to change differences instead of article pages'
 215+ 'wlexcludeuser' => 'A user whose edits should not be shown in the watchlist',
 216+ 'linktodiffs' => 'Link to change differences instead of article pages',
210217 );
211218 }
212219

Status & tagging log