From 31c1624fc899800256b487f1228d01e3b14b4195 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sun, 29 Mar 2009 12:51:39 +0000 Subject: [PATCH] API: Don't give patrol tokens for non-new RCs if only NP patrol is enabled --- includes/api/ApiQueryRecentChanges.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index 94b1feeb52..13e7375f08 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -68,7 +68,8 @@ class ApiQueryRecentChanges extends ApiQueryBase { public static function getPatrolToken($pageid, $title, $rc) { global $wgUser; - if(!$wgUser->useRCPatrol() && !$wgUser->useNPPatrol()) + if(!$wgUser->useRCPatrol() && (!$wgUser->useNPPatrol() || + $rc->getAttribute('rc_type') != RC_NEW)) return false; // The patrol token is always the same, let's exploit that -- 2.20.1