r49000 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48999‎ | r49000 | r49001 >
Date:12:51, 29 March 2009
Author:catrope
Status:ok
Tags:
Comment:
API: Don't give patrol tokens for non-new RCs if only NP patrol is enabled
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryRecentChanges.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryRecentChanges.php
@@ -68,7 +68,8 @@
6969 public static function getPatrolToken($pageid, $title, $rc)
7070 {
7171 global $wgUser;
72 - if(!$wgUser->useRCPatrol() && !$wgUser->useNPPatrol())
 72+ if(!$wgUser->useRCPatrol() && (!$wgUser->useNPPatrol() ||
 73+ $rc->getAttribute('rc_type') != RC_NEW))
7374 return false;
7475
7576 // The patrol token is always the same, let's exploit that

Status & tagging log