summaryrefslogtreecommitdiff
path: root/includes/api/ApiUnblock.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiUnblock.php')
-rw-r--r--includes/api/ApiUnblock.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/includes/api/ApiUnblock.php b/includes/api/ApiUnblock.php
index cd52c518..9216317a 100644
--- a/includes/api/ApiUnblock.php
+++ b/includes/api/ApiUnblock.php
@@ -44,7 +44,6 @@ class ApiUnblock extends ApiBase {
*/
public function execute() {
global $wgUser;
- $this->getMain()->requestWriteMode();
$params = $this->extractRequestParams();
if($params['gettoken'])
@@ -72,7 +71,7 @@ class ApiUnblock extends ApiBase {
if($retval)
$this->dieUsageMsg($retval);
- $res['id'] = $id;
+ $res['id'] = intval($id);
$res['user'] = $user;
$res['reason'] = $reason;
$this->getResult()->addValue(null, $this->getModuleName(), $res);
@@ -80,6 +79,10 @@ class ApiUnblock extends ApiBase {
public function mustBePosted() { return true; }
+ public function isWriteMode() {
+ return true;
+ }
+
public function getAllowedParams() {
return array (
'id' => null,
@@ -114,6 +117,6 @@ class ApiUnblock extends ApiBase {
}
public function getVersion() {
- return __CLASS__ . ': $Id: ApiUnblock.php 42651 2008-10-27 12:06:49Z catrope $';
+ return __CLASS__ . ': $Id: ApiUnblock.php 48091 2009-03-06 13:49:44Z catrope $';
}
}