X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Funsilence.php;h=cde37201b16f66779c4879789c5e20a27f1e2963;hb=72c86913a427e4626b8b43cb725a65cd7f7a0f3c;hp=7d282c3661e02deb9f931d6d05fa59d55a19b2fb;hpb=53650c7a5e8f2a27f8d0d02367bda8934f59c0e6;p=quix0rs-gnu-social.git diff --git a/actions/unsilence.php b/actions/unsilence.php index 7d282c3661..cde37201b1 100644 --- a/actions/unsilence.php +++ b/actions/unsilence.php @@ -40,7 +40,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ */ - class UnsilenceAction extends ProfileFormAction { /** @@ -50,8 +49,7 @@ class UnsilenceAction extends ProfileFormAction * * @return boolean success flag */ - - function prepare($args) + function prepare(array $args=array()) { if (!parent::prepare($args)) { return false; @@ -62,15 +60,15 @@ class UnsilenceAction extends ProfileFormAction assert(!empty($cur)); // checked by parent if (!$cur->hasRight(Right::SILENCEUSER)) { + // TRANS: Client error on page to unsilence a user when the feature is not enabled. $this->clientError(_('You cannot silence users on this site.')); - return false; } assert(!empty($this->profile)); // checked by parent if (!$this->profile->isSilenced()) { + // TRANS: Client error on page to unsilence a user when the to be unsilenced user has not been silenced. $this->clientError(_('User is not silenced.')); - return false; } return true; @@ -81,7 +79,6 @@ class UnsilenceAction extends ProfileFormAction * * @return void */ - function handlePost() { $this->profile->unsilence();