X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fsilence.php;h=6a4f84deb9a15390d89548750597af81a7735630;hb=0a20abf1d8a9a068df9310d6903cc303f39b25ed;hp=09cc480d9ebbcb274dfe741ae822a84caabb8cf4;hpb=dd7b95c2cffe7e33f32d841ed8950e09b44b853d;p=quix0rs-gnu-social.git diff --git a/actions/silence.php b/actions/silence.php index 09cc480d9e..6a4f84deb9 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,15 +60,15 @@ class SilenceAction extends ProfileFormAction assert(!empty($cur)); // checked by parent if (!$cur->hasRight(Right::SILENCEUSER)) { + // 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()) { + // TRANS: Client error displayed trying to silence an already silenced user. $this->clientError(_('User is already silenced.')); - return false; } return true; @@ -81,7 +79,6 @@ class SilenceAction extends ProfileFormAction * * @return void */ - function handlePost() { $this->profile->silence();