summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/GroupController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user/controllers/GroupController.php')
-rw-r--r--application/modules/user/controllers/GroupController.php28
1 files changed, 16 insertions, 12 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;
}
}