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.php24
1 files changed, 14 insertions, 10 deletions
diff --git a/application/modules/user/controllers/RoleController.php b/application/modules/user/controllers/RoleController.php
index 9e118b2..0b0cb7d 100644
--- a/application/modules/user/controllers/RoleController.php
+++ b/application/modules/user/controllers/RoleController.php
@@ -67,7 +67,9 @@ class User_RoleController extends Zend_Controller_Action
{
$roleID = $this->_request->getParam('roleID');
if(!isset($roleID)) {
- $roleID = $this->userIDsNamespace['roleID'];
+ if(count($this->userIDsNamespace) > 0) {
+ $roleID = $this->userIDsNamespace['roleID'];
+ }
}
if(!isset($roleID)) {
$addForm = new user_Form_RoleAdd();
@@ -95,11 +97,7 @@ class User_RoleController extends Zend_Controller_Action
echo "Message: " . $e->getMessage() . "<br/>";
return;
}
- if(strpos($_SERVER['HTTP_REFERER'], '/user/role/show/roleID')) {
- $this->_redirect('/user/role/show/roleID/' . $roleID);
- } else {
- $this->_helper->redirector('', 'role');
- }
+ $this->_redirect($_SERVER['HTTP_REFERER']);
return;
}
}
@@ -110,7 +108,9 @@ class User_RoleController extends Zend_Controller_Action
{
$roleID = $this->_request->getParam('roleID');
if(!isset($roleID)) {
- $roleID = $this->userIDsNamespace['roleID'];
+ if(count($this->userIDsNamespace) > 0) {
+ $roleID = $this->userIDsNamespace['roleID'];
+ }
}
if($roleID) {
$rightroles = $this->rightRolesMapper->findBy('roleID', $roleID);
@@ -135,10 +135,12 @@ class User_RoleController extends Zend_Controller_Action
public function deleteAction()
{
$this->_helper->viewRenderer->setNoRender();
+ $roleID = $this->_request->getParam('roleID');
if(!isset($roleID)) {
- $roleID = $this->userIDsNamespace['roleID'];
+ if(count($this->userIDsNamespace) > 0) {
+ $roleID = $this->userIDsNamespace['roleID'];
+ }
}
- $roleID = $this->_request->getParam('roleID');
if (isset($roleID)){
$role = $this->roleMapper->find($roleID);
try {
@@ -161,7 +163,9 @@ class User_RoleController extends Zend_Controller_Action
{
$roleID = $this->_request->getParam('roleID');
if(!isset($roleID)) {
- $roleID = $this->userIDsNamespace['roleID'];
+ if(count($this->userIDsNamespace) > 0) {
+ $roleID = $this->userIDsNamespace['roleID'];
+ }
}
if(isset($roleID)) {
$rightroles = $this->rightRolesMapper->findBy('roleID', $roleID);