X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fsilence.php;h=c44aa3a6d788a1764cd33a9ac1d3730f0c93ee29;hb=0e439117a75698629c5066d0241ab41dc07b5ee1;hp=206e5ba878fcf797f30f51acef55b9d8e1d0dce5;hpb=6a1afda259c5223449f679a64f932e36df5ebe39;p=quix0rs-gnu-social.git diff --git a/actions/silence.php b/actions/silence.php index 206e5ba878..c44aa3a6d7 100644 --- a/actions/silence.php +++ b/actions/silence.php @@ -40,7 +40,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ */ - class SilenceAction extends ProfileFormAction { /** @@ -50,7 +49,6 @@ class SilenceAction extends ProfileFormAction * * @return boolean success flag */ - function prepare($args) { if (!parent::prepare($args)) { @@ -62,14 +60,16 @@ class SilenceAction extends ProfileFormAction assert(!empty($cur)); // checked by parent if (!$cur->hasRight(Right::SILENCEUSER)) { - $this->clientError(_("You cannot silence users on this site.")); + // TRANS: Client error displayed trying to silence a user on a site where 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()) { - $this->clientError(_("User is already silenced.")); + // TRANS: Client error displayed trying to silence an already silenced user. + $this->clientError(_('User is already silenced.')); return false; } @@ -81,7 +81,6 @@ class SilenceAction extends ProfileFormAction * * @return void */ - function handlePost() { $this->profile->silence();