X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fblock.php;h=1d2910dc1914ec9ab05c1b8f1d08572439c3db9f;hb=d295d8b43ceb3b7cb60665817d526fe86186302c;hp=e87353b4e13ce86096eabb79303fb7fca84aa900;hpb=749367e12f9742d7fd5ee028230fefa627599125;p=quix0rs-gnu-social.git diff --git a/actions/block.php b/actions/block.php index e87353b4e1..1d2910dc19 100644 --- a/actions/block.php +++ b/actions/block.php @@ -53,7 +53,7 @@ class BlockAction extends ProfileFormAction * * @return boolean success flag */ - function prepare($args) + function prepare(array $args = array()) { if (!parent::prepare($args)) { return false; @@ -66,7 +66,6 @@ class BlockAction extends ProfileFormAction if ($cur->hasBlocked($this->profile)) { // TRANS: Client error displayed when blocking a user that has already been blocked. $this->clientError(_('You already blocked that user.')); - return false; } return true; @@ -75,13 +74,11 @@ class BlockAction extends ProfileFormAction /** * Handle request * - * Shows a page with list of favorite notices - * * @param array $args $_REQUEST args; handled in prepare() * * @return void */ - function handle($args) + function handle() { if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($this->arg('no')) { @@ -155,14 +152,14 @@ class BlockAction extends ProfileFormAction 'submit form_action-primary', 'no', // TRANS: Submit button title for 'No' when blocking a user. - _('Do not block this user')); + _('Do not block this user.')); $this->submit('form_action-yes', // TRANS: Button label on the user block form. _m('BUTTON','Yes'), 'submit form_action-secondary', 'yes', // TRANS: Submit button title for 'Yes' when blocking a user. - _('Block this user')); + _('Block this user.')); $this->elementEnd('fieldset'); $this->elementEnd('form'); } @@ -187,7 +184,6 @@ class BlockAction extends ProfileFormAction if (!$result) { // TRANS: Server error displayed when blocking a user fails. $this->serverError(_('Failed to save block information.')); - return; } }