diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2009-06-10 13:00:47 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2009-06-10 13:00:47 +0200 |
commit | 72e90545454c0e014318fa3c81658e035aac58c1 (patch) | |
tree | 9212e3f46868989c4d57ae9a5c8a1a80e4dc0702 /includes/api/ApiPatrol.php | |
parent | 565a0ccc371ec1a2a0e9b39487cbac18e6f60e25 (diff) |
applying patch to version 1.15.0
Diffstat (limited to 'includes/api/ApiPatrol.php')
-rw-r--r-- | includes/api/ApiPatrol.php | 11 |
1 files changed, 7 insertions, 4 deletions
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 $'; } } |