X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fsandbox.php;h=9397a093031ee046cfb510b2de372256bcd222c3;hb=4694d068f965ec733edcfe5c9afe8244ae01f00a;hp=d1ef4c86b2858cd302f384343571853db231b9ce;hpb=2af12774bf9699b7234e3015dc4eb14b1cdff13d;p=quix0rs-gnu-social.git diff --git a/actions/sandbox.php b/actions/sandbox.php index d1ef4c86b2..9397a09303 100644 --- a/actions/sandbox.php +++ b/actions/sandbox.php @@ -40,7 +40,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ */ - class SandboxAction extends ProfileFormAction { /** @@ -50,8 +49,7 @@ class SandboxAction 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 SandboxAction extends ProfileFormAction assert(!empty($cur)); // checked by parent if (!$cur->hasRight(Right::SANDBOXUSER)) { + // TRANS: Client error displayed trying to sandbox users on a site where the feature is not enabled. $this->clientError(_('You cannot sandbox users on this site.')); - return false; } assert(!empty($this->profile)); // checked by parent if ($this->profile->isSandboxed()) { + // TRANS: Client error displayed trying to sandbox an already sandboxed user. $this->clientError(_('User is already sandboxed.')); - return false; } return true; @@ -81,7 +79,6 @@ class SandboxAction extends ProfileFormAction * * @return void */ - function handlePost() { $this->profile->sandbox();