summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/RoleController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user/controllers/RoleController.php')
-rw-r--r--application/modules/user/controllers/RoleController.php22
1 files changed, 9 insertions, 13 deletions
diff --git a/application/modules/user/controllers/RoleController.php b/application/modules/user/controllers/RoleController.php
index 74efd70..91357f0 100644
--- a/application/modules/user/controllers/RoleController.php
+++ b/application/modules/user/controllers/RoleController.php
@@ -61,7 +61,7 @@ class User_RoleController extends Zend_Controller_Action
}
public function searchAction(){
- if(Pbs_Acl::checkRight('ro')) {
+ if(!Pbs_Acl::checkRight('ro')) {
$this->_redirect('/user');
}
$this->_redirect('/user/role/index/search/'.($_GET['search']));
@@ -157,7 +157,7 @@ class User_RoleController extends Zend_Controller_Action
if ($editForm->isValid($_POST)) {
$role = new Application_Model_Role($_POST);
- $role->setID($this->_request->getParam('roleID'));
+ $role->setID($roleID);
try {
$this->roleMapper->save($role);
} catch(Zend_Exception $e)
@@ -166,15 +166,7 @@ class User_RoleController extends Zend_Controller_Action
echo "Message: " . $e->getMessage() . "<br/>";
return;
}
- if($_SERVER['HTTP_REFERER']) {
- $this->_redirect($_SERVER['HTTP_REFERER']);
- } else {
- if(isset($roleID)) {
- $this->_redirect('/user/role/show/roleID/' . $roleID);
- } else {
- $this->_helper->redirector('', 'role');
- }
- }
+ $this->_helper->redirector('', 'role');
return;
}
}
@@ -272,8 +264,12 @@ class User_RoleController extends Zend_Controller_Action
echo "Message: " . $e->getMessage() . "<br/>";
return;
}
- if(strpos($_SERVER['HTTP_REFERER'], '/user/role/show') !== false && strpos($_SERVER['HTTP_REFERER'], '/roleID/') === false) {
- $this->_helper->redirector('changemembership', 'person');
+ if($_SERVER['HTTP_REFERER']) {
+ if(strpos($_SERVER['HTTP_REFERER'], '/user/role/show') !== false && strpos($_SERVER['HTTP_REFERER'], '/roleID/') === false) {
+ $this->_helper->redirector('changemembership', 'person');
+ } else {
+ $this->_helper->redirector('', 'role');
+ }
} else {
$this->_helper->redirector('', 'role');
}