diff --git a/Web/Presenters/GroupPresenter.php b/Web/Presenters/GroupPresenter.php index 101e71b3..7b551859 100644 --- a/Web/Presenters/GroupPresenter.php +++ b/Web/Presenters/GroupPresenter.php @@ -199,10 +199,12 @@ final class GroupPresenter extends OpenVKPresenter $this->template->club = $club; if($_SERVER["REQUEST_METHOD"] === "POST") { + if(!$club->setShortcode( empty($this->postParam("shortcode")) ? NULL : $this->postParam("shortcode") )) + $this->flashFail("err", tr("error"), tr("error_shorturl_incorrect")); + $club->setName(empty($this->postParam("name")) ? $club->getName() : $this->postParam("name")); $club->setAbout(empty($this->postParam("about")) ? NULL : $this->postParam("about")); - $club->setShortcode(empty($this->postParam("shortcode")) ? NULL : $this->postParam("shortcode")); - $club->setWall(empty($this->postParam("wall")) ? 0 : 1); + $club->setWall(empty($this->postParam("wall")) ? 0 : 1); $club->setAdministrators_List_Display(empty($this->postParam("administrators_list_display")) ? 0 : $this->postParam("administrators_list_display")); $club->setEveryone_Can_Create_Topics(empty($this->postParam("everyone_can_create_topics")) ? 0 : 1); $club->setDisplay_Topics_Above_Wall(empty($this->postParam("display_topics_above_wall")) ? 0 : 1);