summaryrefslogtreecommitdiff
path: root/includes/api/ApiUnblock.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2009-06-10 13:00:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2009-06-10 13:00:47 +0200
commit72e90545454c0e014318fa3c81658e035aac58c1 (patch)
tree9212e3f46868989c4d57ae9a5c8a1a80e4dc0702 /includes/api/ApiUnblock.php
parent565a0ccc371ec1a2a0e9b39487cbac18e6f60e25 (diff)
applying patch to version 1.15.0
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 $';
}
}