From 370e83bb0dfd0c70de268c93bf07ad5ee0897192 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 15 Aug 2008 01:29:47 +0200 Subject: Update auf 1.13.0 --- includes/api/ApiBlock.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'includes/api/ApiBlock.php') diff --git a/includes/api/ApiBlock.php b/includes/api/ApiBlock.php index e5c238ae..34813bf7 100644 --- a/includes/api/ApiBlock.php +++ b/includes/api/ApiBlock.php @@ -31,7 +31,7 @@ if (!defined('MEDIAWIKI')) { * API module that facilitates the blocking of users. Requires API write mode * to be enabled. * - * @addtogroup API + * @ingroup API */ class ApiBlock extends ApiBase { @@ -87,17 +87,15 @@ class ApiBlock extends ApiBase { $form->BlockEmail = $params['noemail']; $form->BlockHideName = $params['hidename']; - $dbw = wfGetDb(DB_MASTER); - $dbw->begin(); + $userID = $expiry = null; $retval = $form->doBlock($userID, $expiry); if(!empty($retval)) // We don't care about multiple errors, just report one of them $this->dieUsageMsg($retval); - $dbw->commit(); $res['user'] = $params['user']; $res['userID'] = $userID; - $res['expiry'] = ($expiry == Block::infinity() ? 'infinite' : $expiry); + $res['expiry'] = ($expiry == Block::infinity() ? 'infinite' : wfTimestamp(TS_ISO_8601, $expiry)); $res['reason'] = $params['reason']; if($params['anononly']) $res['anononly'] = ''; @@ -159,6 +157,6 @@ class ApiBlock extends ApiBase { } public function getVersion() { - return __CLASS__ . ': $Id: ApiBlock.php 30222 2008-01-28 19:05:26Z catrope $'; + return __CLASS__ . ': $Id: ApiBlock.php 35388 2008-05-27 10:18:28Z catrope $'; } } -- cgit v1.2.3-54-g00ecf