summaryrefslogtreecommitdiff
path: root/includes/api/ApiFeedWatchlist.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiFeedWatchlist.php')
-rw-r--r--includes/api/ApiFeedWatchlist.php20
1 files changed, 6 insertions, 14 deletions
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$';
- }
}