From: Roan Kattouw Date: Sun, 29 Mar 2009 12:51:39 +0000 (+0000) Subject: API: Don't give patrol tokens for non-new RCs if only NP patrol is enabled X-Git-Tag: 1.31.0-rc.0~42291 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=31c1624fc899800256b487f1228d01e3b14b4195;p=lhc%2Fweb%2Fwiklou.git API: Don't give patrol tokens for non-new RCs if only NP patrol is enabled --- 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