Beispiel #1
0
 /**
  * Save changes to a group.
  */
 function updateGroup()
 {
     $groupId = Request::getUserVar('groupId') === null ? null : (int) Request::getUserVar('groupId');
     if ($groupId === null) {
         $this->validate();
         $group = null;
     } else {
         $this->validate($groupId);
         $group =& $this->group;
     }
     $this->setupTemplate($group);
     import('manager.form.GroupForm');
     $groupForm = new GroupForm($group);
     $groupForm->readInputData();
     if ($groupForm->validate()) {
         $groupForm->execute();
         Request::redirect(null, null, 'groups');
     } else {
         $templateMgr =& TemplateManager::getManager();
         $templateMgr->append('pageHierarchy', array(Request::url(null, 'manager', 'groups'), 'manager.groups'));
         $templateMgr->assign('pageTitle', $group ? 'manager.groups.editTitle' : 'manager.groups.createTitle');
         $groupForm->display();
     }
 }