summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Geiger2011-03-28 17:02:38 +0200
committerBjörn Geiger2011-03-28 17:02:38 +0200
commit0c6d4fbd7d790459b1e8a1f777f8b27ddc7efbee (patch)
tree56298ebd24f6916f79bff5fe1ace96a6bd3175fe
parentüberschriften hinzugefügt, andere Fehler korrigiert (diff)
downloadpbs2-0c6d4fbd7d790459b1e8a1f777f8b27ddc7efbee.tar.gz
pbs2-0c6d4fbd7d790459b1e8a1f777f8b27ddc7efbee.tar.xz
pbs2-0c6d4fbd7d790459b1e8a1f777f8b27ddc7efbee.zip
noch ein Fehler
-rw-r--r--application/modules/user/controllers/GroupController.php28
-rw-r--r--application/modules/user/controllers/RoleController.php24
2 files changed, 30 insertions, 22 deletions
diff --git a/application/modules/user/controllers/GroupController.php b/application/modules/user/controllers/GroupController.php
index 1ceb844..7a21aa9 100644
--- a/application/modules/user/controllers/GroupController.php
+++ b/application/modules/user/controllers/GroupController.php
@@ -85,7 +85,9 @@ class User_GroupController extends Zend_Controller_Action
{
$groupID = $this->_request->getParam('groupID');
if(!isset($groupID)) {
- $groupID = $this->userIDsNamespace['groupID'];
+ if(count($this->userIDsNamespace) > 0) {
+ $groupID = $this->userIDsNamespace['groupID'];
+ }
}
if(!isset($groupID)) {
$addForm = new user_Form_GroupAdd(array('grouplist' => $this->groupList));
@@ -110,15 +112,7 @@ class User_GroupController extends Zend_Controller_Action
echo "Message: " . $e->getMessage() . "<br/>";
return;
}
- 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');
- }
+ $this->_redirect($_SERVER['HTTP_REFERER']);
return;
}
}
@@ -130,7 +124,9 @@ class User_GroupController extends Zend_Controller_Action
{
$groupID = $this->_request->getParam('groupID');
if(!isset($groupID)) {
- $groupID = $this->userIDsNamespace['groupID'];
+ if(count($this->userIDsNamespace) > 0) {
+ $groupID = $this->userIDsNamespace['groupID'];
+ }
}
if($groupID) {
$groupRequests = $this->groupRequestMapper->findBy('groupID', $groupID);
@@ -169,6 +165,9 @@ class User_GroupController extends Zend_Controller_Action
$this->view->userIDsNamespace = $this->userIDsNamespace;
$this->view->group = $group;
$this->view->groupID = $groupID;
+ } else {
+ $this->_redirect('/user/');
+ return;
}
}
@@ -204,7 +203,9 @@ class User_GroupController extends Zend_Controller_Action
$this->_helper->viewRenderer->setNoRender();
$groupID = $this->_request->getParam('groupID');
if(!isset($groupID)) {
- $groupID = $this->userIDsNamespace['groupID'];
+ if(count($this->userIDsNamespace) > 0) {
+ $groupID = $this->userIDsNamespace['groupID'];
+ }
}
if (isset($groupID)){
$group = $this->groupMapper->find($groupID);
@@ -226,6 +227,9 @@ class User_GroupController extends Zend_Controller_Action
$this->_helper->redirector('showall', 'group');
}
return;
+ } else {
+ $this->_redirect('/user/');
+ return;
}
}
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);