From e2507594917f0a40cb9dab7db46ab6544574c039 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Tue, 18 Nov 2008 15:21:04 +0000 Subject: [PATCH] API: Make reblocking (introduced in r42843) possible through the API * Add reblock parameter to action=block * Tweak the description for allowusertalk for consistency --- includes/api/ApiBlock.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/api/ApiBlock.php b/includes/api/ApiBlock.php index dd55206576..e01b64d5b9 100644 --- a/includes/api/ApiBlock.php +++ b/includes/api/ApiBlock.php @@ -85,6 +85,7 @@ class ApiBlock extends ApiBase { $form->BlockEmail = $params['noemail']; $form->BlockHideName = $params['hidename']; $form->BlockAllowUsertalk = $params['allowusertalk'] && $wgBlockAllowsUTEdit; + $form->BlockReblock = $params['reblock']; $userID = $expiry = null; $retval = $form->doBlock($userID, $expiry); @@ -127,6 +128,7 @@ class ApiBlock extends ApiBase { 'noemail' => false, 'hidename' => false, 'allowusertalk' => false, + 'reblock' => false, ); } @@ -142,7 +144,8 @@ class ApiBlock extends ApiBase { 'autoblock' => 'Automatically block the last used IP address, and any subsequent IP addresses they try to login from', 'noemail' => 'Prevent user from sending e-mail through the wiki. (Requires the "blockemail" right.)', 'hidename' => 'Hide the username from the block log. (Requires the "hideuser" right.)', - 'allowusertalk' => 'Whether to allow the user to edit their own talk page (Dependent on $wgBlockAllowsUTEdit)' + 'allowusertalk' => 'Allow the user to edit their own talk page (depends on $wgBlockAllowsUTEdit)', + 'reblock' => 'If the user is already blocked, overwrite the existing block', ); } -- 2.20.1