diff options
Diffstat (limited to 'application/modules/user/controllers')
-rw-r--r-- | application/modules/user/controllers/GroupController.php | 12 | ||||
-rw-r--r-- | application/modules/user/controllers/RoleController.php | 8 |
2 files changed, 17 insertions, 3 deletions
diff --git a/application/modules/user/controllers/GroupController.php b/application/modules/user/controllers/GroupController.php index 3180ebd..1ceb844 100644 --- a/application/modules/user/controllers/GroupController.php +++ b/application/modules/user/controllers/GroupController.php @@ -110,7 +110,15 @@ class User_GroupController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "<br/>"; return; } - $this->_helper->redirector('', 'group'); + if(strpos($_SERVER['HTTP_REFERER'], '/user/group/show')) { + if(strpos($_SERVER['HTTP_REFERER'], '/groupID/')) { + $this->_redirect('/user/group/groupID/' . $groupID); + } else { + $this->_helper->redirector('show', 'group'); + } + } else { + $this->_helper->redirector('showall', 'group'); + } return; } } @@ -210,7 +218,7 @@ class User_GroupController extends Zend_Controller_Action } if(strpos($_SERVER['HTTP_REFERER'], '/user/group/show')) { if(strpos($_SERVER['HTTP_REFERER'], '/groupID/')) { - $this->_redirect('/user/group/show/groupID/' . $groupID); + $this->_redirect('/user/group/showall'); } else { $this->_helper->redirector('changemembership', 'person'); } diff --git a/application/modules/user/controllers/RoleController.php b/application/modules/user/controllers/RoleController.php index b3795de..62d1550 100644 --- a/application/modules/user/controllers/RoleController.php +++ b/application/modules/user/controllers/RoleController.php @@ -76,10 +76,12 @@ class User_RoleController extends Zend_Controller_Action $_POST['title'] = $role->getTitle(); $_POST['description'] = $role->getDescription(); $_POST['groupID'] = $role->getGroupID(); + $_POST['inheritance'] = $role->getInheritance(); $editForm = new user_Form_RoleEdit(array('roleID' => $roleID)); } else { $editForm = new user_Form_RoleEdit(array('roleID' => $roleID), $_POST); if ($editForm->isValid($_POST)) { + $role = new Application_Model_Role($_POST); $role->setID($this->_request->getParam('roleID')); try { @@ -90,7 +92,11 @@ class User_RoleController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "<br/>"; return; } - $this->_helper->redirector('', 'role'); + if(strpos($_SERVER['HTTP_REFERER'], '/user/role/show/roleID')) { + $this->_redirect('/user/role/show/roleID/' . $roleID); + } else { + $this->_helper->redirector('', 'role'); + } return; } } |