Add Platonides' "add wlexcludeuser to feedwatchlist" patch from bug 25325
authorSam Reed <reedy@users.mediawiki.org>
Mon, 14 Nov 2011 14:36:06 +0000 (14:36 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 14 Nov 2011 14:36:06 +0000 (14:36 +0000)
RELEASE-NOTES-1.19
includes/api/ApiFeedWatchlist.php

index 712f6c5..acdaff6 100644 (file)
@@ -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 ===
 
index e77a08c..36b0ba9 100644 (file)
@@ -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',
                );
        }