* @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
* @link http://status.net/
*/
-
class SandboxAction extends ProfileFormAction
{
/**
*
* @return boolean success flag
*/
-
- function prepare($args)
+ function prepare(array $args = array())
{
if (!parent::prepare($args)) {
return false;
assert(!empty($cur)); // checked by parent
if (!$cur->hasRight(Right::SANDBOXUSER)) {
- $this->clientError(_("You cannot sandbox users on this site."));
- return false;
+ // 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.'));
}
assert(!empty($this->profile)); // checked by parent
if ($this->profile->isSandboxed()) {
- $this->clientError(_("User is already sandboxed."));
- return false;
+ // TRANS: Client error displayed trying to sandbox an already sandboxed user.
+ $this->clientError(_('User is already sandboxed.'));
}
return true;
*
* @return void
*/
-
function handlePost()
{
$this->profile->sandbox();