jenkins-bot has submitted this change and it was merged.

Change subject: (bug 25325) fix wlexcludeuser for ApiFeedWatchlist
......................................................................


(bug 25325) fix wlexcludeuser for ApiFeedWatchlist

The effect of setting this option was later overwritten in the code; I
just moved an if a few lines down.

Also some null comparison cleanup.

Change-Id: I2a85673330681c6ff7facc25a7bbfb6972fe8fd5
---
M includes/api/ApiFeedWatchlist.php
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Yurik: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiFeedWatchlist.php 
b/includes/api/ApiFeedWatchlist.php
index a3b4682..6c793b3 100644
--- a/includes/api/ApiFeedWatchlist.php
+++ b/includes/api/ApiFeedWatchlist.php
@@ -61,9 +61,6 @@
                        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 ) );
@@ -80,12 +77,15 @@
                                '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'] ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/53049
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a85673330681c6ff7facc25a7bbfb6972fe8fd5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex <[email protected]>
Gerrit-Reviewer: Matmarex <[email protected]>
Gerrit-Reviewer: Yurik <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to