From b9b85843572bf283f48285001e276ba7e61b63f6 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 22 Feb 2009 13:37:51 +0100 Subject: updated to MediaWiki 1.14.0 --- includes/api/ApiUnblock.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'includes/api/ApiUnblock.php') 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 $'; } } -- cgit v1.2.3-54-g00ecf