From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 12 Aug 2013 09:28:15 +0200 Subject: Update to MediaWiki 1.21.1 --- includes/api/ApiFeedWatchlist.php | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'includes/api/ApiFeedWatchlist.php') diff --git a/includes/api/ApiFeedWatchlist.php b/includes/api/ApiFeedWatchlist.php index 6ccb02fe..6c793b36 100644 --- a/includes/api/ApiFeedWatchlist.php +++ b/includes/api/ApiFeedWatchlist.php @@ -33,10 +33,6 @@ */ class ApiFeedWatchlist extends ApiBase { - public function __construct( $main, $action ) { - parent::__construct( $main, $action ); - } - /** * This module uses a custom feed wrapper printer. * @@ -62,12 +58,9 @@ class ApiFeedWatchlist extends ApiBase { $this->dieUsage( 'Syndication feeds are not available', 'feed-unavailable' ); } - if( !isset( $wgFeedClasses[ $params['feedformat'] ] ) ) { + 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 ) ); @@ -84,12 +77,15 @@ class ApiFeedWatchlist extends ApiBase { 'wllimit' => ( 50 > $wgFeedLimit ) ? $wgFeedLimit : 50 ); - if ( !is_null( $params['wlowner'] ) ) { + if ( $params['wlowner'] !== null ) { $fauxReqArr['wlowner'] = $params['wlowner']; } - if ( !is_null( $params['wltoken'] ) ) { + if ( $params['wltoken'] !== null ) { $fauxReqArr['wltoken'] = $params['wltoken']; } + if ( $params['wlexcludeuser'] !== null ) { + $fauxReqArr['wlexcludeuser'] = $params['wlexcludeuser']; + } // Support linking to diffs instead of article if ( $params['linktodiffs'] ) { @@ -233,8 +229,4 @@ class ApiFeedWatchlist extends ApiBase { public function getHelpUrls() { return 'https://www.mediawiki.org/wiki/API:Watchlist_feed'; } - - public function getVersion() { - return __CLASS__ . ': $Id$'; - } } -- cgit v1.2.2