diff options
Diffstat (limited to 'includes/api/ApiUnblock.php')
-rw-r--r-- | includes/api/ApiUnblock.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/includes/api/ApiUnblock.php b/includes/api/ApiUnblock.php index afbd3f0e..d6a02a2a 100644 --- a/includes/api/ApiUnblock.php +++ b/includes/api/ApiUnblock.php @@ -31,7 +31,7 @@ if (!defined('MEDIAWIKI')) { * API module that facilitates the unblocking of users. Requires API write mode * to be enabled. * - * @addtogroup API + * @ingroup API */ class ApiUnblock extends ApiBase { @@ -41,7 +41,7 @@ class ApiUnblock extends ApiBase { /** * Unblocks the specified user or provides the reason the unblock failed. - */ + */ public function execute() { global $wgUser; $this->getMain()->requestWriteMode(); @@ -70,19 +70,16 @@ class ApiUnblock extends ApiBase { $id = $params['id']; $user = $params['user']; $reason = (is_null($params['reason']) ? '' : $params['reason']); - $dbw = wfGetDb(DB_MASTER); - $dbw->begin(); $retval = IPUnblockForm::doUnblock($id, $user, $reason, $range); if(!empty($retval)) $this->dieUsageMsg($retval); - $dbw->commit(); $res['id'] = $id; $res['user'] = $user; $res['reason'] = $reason; $this->getResult()->addValue(null, $this->getModuleName(), $res); } - + public function mustBePosted() { return true; } public function getAllowedParams() { @@ -119,6 +116,6 @@ class ApiUnblock extends ApiBase { } public function getVersion() { - return __CLASS__ . ': $Id: ApiUnblock.php 30222 2008-01-28 19:05:26Z catrope $'; + return __CLASS__ . ': $Id: ApiUnblock.php 35098 2008-05-20 17:13:28Z ialex $'; } } |