X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Feditgroup.php;h=ad0b6e185dcfe97c801a0787e382a4982bb21be6;hb=c473a39a7da07fbe5b80fec4c08111a554691c3a;hp=b8dac31cb180421a565e62c2e9d10e5cbdadaba7;hpb=b3b3af9a2eff10c272bb213eccd3dd3060bc5830;p=quix0rs-gnu-social.git diff --git a/actions/editgroup.php b/actions/editgroup.php index b8dac31cb1..ad0b6e185d 100644 --- a/actions/editgroup.php +++ b/actions/editgroup.php @@ -64,11 +64,6 @@ class EditgroupAction extends GroupDesignAction { parent::prepare($args); - if (!common_config('inboxes','enabled')) { - $this->serverError(_('Inboxes must be enabled for groups to work')); - return false; - } - if (!common_logged_in()) { $this->clientError(_('You must be logged in to create a group.')); return false; @@ -86,7 +81,7 @@ class EditgroupAction extends GroupDesignAction } if (!$nickname) { - $this->clientError(_('No nickname'), 404); + $this->clientError(_('No nickname.'), 404); return false; } @@ -98,14 +93,14 @@ class EditgroupAction extends GroupDesignAction } if (!$this->group) { - $this->clientError(_('No such group'), 404); + $this->clientError(_('No such group.'), 404); return false; } $cur = common_current_user(); if (!$cur->isAdmin($this->group)) { - $this->clientError(_('You must be an admin to edit the group'), 403); + $this->clientError(_('You must be an admin to edit the group.'), 403); return false; } @@ -170,7 +165,7 @@ class EditgroupAction extends GroupDesignAction { $cur = common_current_user(); if (!$cur->isAdmin($this->group)) { - $this->clientError(_('You must be an admin to edit the group'), 403); + $this->clientError(_('You must be an admin to edit the group.'), 403); return; } @@ -202,8 +197,8 @@ class EditgroupAction extends GroupDesignAction } else if (!is_null($fullname) && mb_strlen($fullname) > 255) { $this->showForm(_('Full name is too long (max 255 chars).')); return; - } else if (!is_null($description) && mb_strlen($description) > 140) { - $this->showForm(_('description is too long (max 140 chars).')); + } else if (User_group::descriptionTooLong($description)) { + $this->showForm(sprintf(_('description is too long (max %d chars).'), User_group::maxDescription())); return; } else if (!is_null($location) && mb_strlen($location) > 255) { $this->showForm(_('Location is too long (max 255 chars).'));