summaryrefslogtreecommitdiff
path: root/includes/api/ApiUnblock.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
committerPierre Schmitz <pierre@archlinux.de>2008-08-15 01:29:47 +0200
commit370e83bb0dfd0c70de268c93bf07ad5ee0897192 (patch)
tree491674f4c242e4d6ba0d04eafa305174c35a3391 /includes/api/ApiUnblock.php
parentf4debf0f12d0524d2b2427c55ea3f16b680fad97 (diff)
Update auf 1.13.0
Diffstat (limited to 'includes/api/ApiUnblock.php')
-rw-r--r--includes/api/ApiUnblock.php11
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 $';
}
}