X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryWatchlist.php;h=578a908f78692bb10e86f9783f4439b0d7ec5e01;hb=b6d03f5a1548e88f2e3932570beca8a3393ddc4f;hp=cb49622588b1d84f34556e7e985c2ddf97a2b64f;hpb=a38f665c0bffb48dc0da410a33eb6a7c93efc3f1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php index cb49622588..578a908f78 100644 --- a/includes/api/ApiQueryWatchlist.php +++ b/includes/api/ApiQueryWatchlist.php @@ -81,10 +81,8 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { $this->fld_loginfo = isset( $prop['loginfo'] ); $this->fld_tags = isset( $prop['tags'] ); - if ( $this->fld_patrol ) { - if ( !$user->useRCPatrol() && !$user->useNPPatrol() ) { - $this->dieWithError( 'apierror-permissiondenied-patrolflag', 'patrol' ); - } + if ( $this->fld_patrol && !$user->useRCPatrol() && !$user->useNPPatrol() ) { + $this->dieWithError( 'apierror-permissiondenied-patrolflag', 'patrol' ); } if ( $this->fld_comment || $this->fld_parsedcomment ) { @@ -192,12 +190,10 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { $startFrom = [ $recentChangeInfo['rc_timestamp'], $recentChangeInfo['rc_id'] ]; break; } + } elseif ( $params['allrev'] ) { + $ids[] = (int)$recentChangeInfo['rc_this_oldid']; } else { - if ( $params['allrev'] ) { - $ids[] = (int)$recentChangeInfo['rc_this_oldid']; - } else { - $ids[] = (int)$recentChangeInfo['rc_cur_id']; - } + $ids[] = (int)$recentChangeInfo['rc_cur_id']; } }