X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Funblock.php;h=cb03214a9f02db44144b720e0c86da2275ed62b4;hb=d6b28c64830f632bb2f4b6f3c9369b9e56ad217a;hp=0f63e1dae05802c4308f52e7f644d63fb81cbec1;hpb=98a579fedf36ff795e255a4b345651df0ee230bc;p=quix0rs-gnu-social.git diff --git a/actions/unblock.php b/actions/unblock.php index 0f63e1dae0..cb03214a9f 100644 --- a/actions/unblock.php +++ b/actions/unblock.php @@ -42,10 +42,9 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ */ - class UnblockAction extends ProfileFormAction { - function prepare($args) + function prepare(array $args=array()) { if (!parent::prepare($args)) { return false; @@ -56,8 +55,8 @@ class UnblockAction extends ProfileFormAction assert(!empty($cur)); // checked by parent if (!$cur->hasBlocked($this->profile)) { + // TRANS: Client error displayed when trying to unblock a non-blocked user. $this->clientError(_("You haven't blocked that user.")); - return false; } return true; @@ -68,7 +67,6 @@ class UnblockAction extends ProfileFormAction * * @return void */ - function handlePost() { $cur = common_current_user(); @@ -83,8 +81,8 @@ class UnblockAction extends ProfileFormAction } if (!$result) { + // TRANS: Server error displayed when removing a user block. $this->serverError(_('Error removing the block.')); - return; } } }