summaryrefslogtreecommitdiff
path: root/includes/api/ApiPatrol.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiPatrol.php')
-rw-r--r--includes/api/ApiPatrol.php11
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 $';
}
}