https://www.mediawiki.org/wiki/Special:Code/MediaWiki/102987

Revision: 102987
Author:   reedy
Date:     2011-11-14 14:36:06 +0000 (Mon, 14 Nov 2011)
Log Message:
-----------
Add Platonides' "add wlexcludeuser to feedwatchlist" patch from bug 25325

Modified Paths:
--------------
    trunk/phase3/RELEASE-NOTES-1.19
    trunk/phase3/includes/api/ApiFeedWatchlist.php

Modified: trunk/phase3/RELEASE-NOTES-1.19
===================================================================
--- trunk/phase3/RELEASE-NOTES-1.19     2011-11-14 14:33:50 UTC (rev 102986)
+++ trunk/phase3/RELEASE-NOTES-1.19     2011-11-14 14:36:06 UTC (rev 102987)
@@ -149,6 +149,7 @@
 * (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 ===
 

Modified: trunk/phase3/includes/api/ApiFeedWatchlist.php
===================================================================
--- trunk/phase3/includes/api/ApiFeedWatchlist.php      2011-11-14 14:33:50 UTC 
(rev 102986)
+++ trunk/phase3/includes/api/ApiFeedWatchlist.php      2011-11-14 14:36:06 UTC 
(rev 102987)
@@ -70,6 +70,9 @@
                        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 @@
                        'wltoken' => array(
                                ApiBase::PARAM_TYPE => 'string'
                        ),
+                       'wlexcludeuser' => array(
+                               ApiBase::PARAM_TYPE => 'user'
+                       ),
                        'linktodiffs' => false,
                );
        }
@@ -203,9 +209,10 @@
                        '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',
                );
        }
 


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to