diff options
author | Björn Geiger | 2011-03-28 14:38:51 +0200 |
---|---|---|
committer | Björn Geiger | 2011-03-28 14:38:51 +0200 |
commit | 49ebfec064bb6d7a732466fa2071778665beb184 (patch) | |
tree | 98895379ee4152b7312bc415cfc6e2f3dd305faf /application/modules/user/controllers/RoleController.php | |
parent | Einführung einer Rightcategory (diff) | |
download | pbs2-49ebfec064bb6d7a732466fa2071778665beb184.tar.gz pbs2-49ebfec064bb6d7a732466fa2071778665beb184.tar.xz pbs2-49ebfec064bb6d7a732466fa2071778665beb184.zip |
Einführung von Vererbung von Rollen
Diffstat (limited to 'application/modules/user/controllers/RoleController.php')
-rw-r--r-- | application/modules/user/controllers/RoleController.php | 8 |
1 files changed, 7 insertions, 1 deletions
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; } } |