*/
public function execute() {
global $wgUser, $wgUseRCPatrol, $wgUseNPPatrol;
- $this->getMain()->requestWriteMode();
$params = $this->extractRequestParams();
if(!isset($params['token']))
$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,
}
public function getVersion() {
- return __CLASS__ . ': $Id: ApiPatrol.php 42548 2008-10-25 14:04:43Z tstarling $';
+ return __CLASS__ . ': $Id: ApiPatrol.php 69579 2010-07-20 02:49:55Z tstarling $';
}
}