From 72e90545454c0e014318fa3c81658e035aac58c1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 10 Jun 2009 13:00:47 +0200 Subject: applying patch to version 1.15.0 --- includes/api/ApiPatrol.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'includes/api/ApiPatrol.php') diff --git a/includes/api/ApiPatrol.php b/includes/api/ApiPatrol.php index 08de87b0..2c9d1ecf 100644 --- a/includes/api/ApiPatrol.php +++ b/includes/api/ApiPatrol.php @@ -42,7 +42,6 @@ class ApiPatrol extends ApiBase { */ public function execute() { global $wgUser, $wgUseRCPatrol, $wgUseNPPatrol; - $this->getMain()->requestWriteMode(); $params = $this->extractRequestParams(); if(!isset($params['token'])) @@ -58,13 +57,17 @@ class ApiPatrol extends ApiBase { $retval = RecentChange::markPatrolled($params['rcid']); if($retval) - $this->dieUsageMsg(current($retval)); + $this->dieUsageMsg(reset($retval)); - $result = array('rcid' => $rc->getAttribute('rc_id')); + $result = array('rcid' => intval($rc->getAttribute('rc_id'))); ApiQueryBase::addTitleInfo($result, $rc->getTitle()); $this->getResult()->addValue(null, $this->getModuleName(), $result); } + public function isWriteMode() { + return true; + } + public function getAllowedParams() { return array ( 'token' => null, @@ -94,6 +97,6 @@ class ApiPatrol extends ApiBase { } public function getVersion() { - return __CLASS__ . ': $Id: ApiPatrol.php 42548 2008-10-25 14:04:43Z tstarling $'; + return __CLASS__ . ': $Id: ApiPatrol.php 48122 2009-03-07 12:58:41Z catrope $'; } } -- cgit v1.2.3-54-g00ecf