summaryrefslogtreecommitdiff
path: root/includes/api/ApiUnblock.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2009-02-22 13:37:51 +0100
committerPierre Schmitz <pierre@archlinux.de>2009-02-22 13:37:51 +0100
commitb9b85843572bf283f48285001e276ba7e61b63f6 (patch)
tree4c6f4571552ada9ccfb4030481dcf77308f8b254 /includes/api/ApiUnblock.php
parentd9a20acc4e789cca747ad360d87ee3f3e7aa58c1 (diff)
updated to MediaWiki 1.14.0
Diffstat (limited to 'includes/api/ApiUnblock.php')
-rw-r--r--includes/api/ApiUnblock.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/includes/api/ApiUnblock.php b/includes/api/ApiUnblock.php
index d6a02a2a..cd52c518 100644
--- a/includes/api/ApiUnblock.php
+++ b/includes/api/ApiUnblock.php
@@ -64,14 +64,12 @@ class ApiUnblock extends ApiBase {
$this->dieUsageMsg(array('sessionfailure'));
if(!$wgUser->isAllowed('block'))
$this->dieUsageMsg(array('cantunblock'));
- if(wfReadOnly())
- $this->dieUsageMsg(array('readonlytext'));
$id = $params['id'];
$user = $params['user'];
$reason = (is_null($params['reason']) ? '' : $params['reason']);
$retval = IPUnblockForm::doUnblock($id, $user, $reason, $range);
- if(!empty($retval))
+ if($retval)
$this->dieUsageMsg($retval);
$res['id'] = $id;
@@ -96,7 +94,7 @@ class ApiUnblock extends ApiBase {
return array (
'id' => 'ID of the block you want to unblock (obtained through list=blocks). Cannot be used together with user',
'user' => 'Username, IP address or IP range you want to unblock. Cannot be used together with id',
- 'token' => 'An unblock token previously obtained through the gettoken parameter',
+ 'token' => 'An unblock token previously obtained through the gettoken parameter or prop=info',
'gettoken' => 'If set, an unblock token will be returned, and no other action will be taken',
'reason' => 'Reason for unblock (optional)',
);
@@ -116,6 +114,6 @@ class ApiUnblock extends ApiBase {
}
public function getVersion() {
- return __CLASS__ . ': $Id: ApiUnblock.php 35098 2008-05-20 17:13:28Z ialex $';
+ return __CLASS__ . ': $Id: ApiUnblock.php 42651 2008-10-27 12:06:49Z catrope $';
}
}