/** * Saves a new group to database * * @return string "" in case of success * @permissions edit */ protected function actionGroupSave() { if (!$this->getObjModule()->rightEdit()) { return $this->getLang("commons_error_permissions"); } if ($this->getParam("mode") == "new") { $objUsersources = new class_module_user_sourcefactory(); $objSource = $objUsersources->getUsersource($this->getParam("usersource")); $objNewGroup = $objSource->getNewGroup(); $objForm = $this->getGroupForm($objNewGroup); } else { $objNewGroup = new class_module_user_group($this->getSystemid()); $objForm = $this->getGroupForm($objNewGroup->getObjSourceGroup()); } if (!$objForm->validateForm()) { return $this->actionGroupNew($this->getParam("mode"), $objForm); } if ($this->getParam("mode") == "new") { $objGroup = new class_module_user_group(); $objGroup->setStrSubsystem($this->getParam("usersource")); } else { $objGroup = new class_module_user_group($this->getSystemid()); } $objGroup->setStrName($this->getParam("group_name")); $objGroup->updateObjectToDb(); $objSourceGroup = $objGroup->getObjSourceGroup(); $objForm = $this->getGroupForm($objSourceGroup); $objForm->updateSourceObject(); $objSourceGroup->updateObjectToDb(); $this->adminReload(class_link::getLinkAdminHref($this->getArrModule("modul"), "groupList", "&peClose=1&blockAction=1")); return ""; }