From 6cd23be5bc8f936e1a76c6d01bbc79ef827fc6f6 Mon Sep 17 00:00:00 2001
From: Björn Geiger
Date: Tue, 5 Apr 2011 12:39:09 +0200
Subject: HTTP-Referer entfernt bzw. Übeprüfung auf vorhanden sein von
['HTTP-Referer']
---
.../modules/user/controllers/GroupController.php | 26 +++++++++-------------
1 file changed, 11 insertions(+), 15 deletions(-)
(limited to 'application/modules/user/controllers/GroupController.php')
diff --git a/application/modules/user/controllers/GroupController.php b/application/modules/user/controllers/GroupController.php
index 76639bd..83358c4 100644
--- a/application/modules/user/controllers/GroupController.php
+++ b/application/modules/user/controllers/GroupController.php
@@ -2,21 +2,13 @@
class User_GroupController extends Zend_Controller_Action
{
-
protected $groupMapper = null;
-
protected $groupGroupsMapper = null;
-
protected $membershipMapper = null;
-
protected $groupRequestMapper = null;
-
protected $personmapper = null;
-
protected $rolemapper = null;
-
protected $groupList = null;
-
protected $userIDsNamespace = null;
public function init()
@@ -112,7 +104,15 @@ class User_GroupController extends Zend_Controller_Action
echo "Message: " . $e->getMessage() . "
";
return;
}
- $this->_redirect($_SERVER['HTTP_REFERER']);
+ if($_SERVER['HTTP_REFERER']) {
+ $this->_redirect($_SERVER['HTTP_REFERER']);
+ } else {
+ if(isset($groupID)) {
+ $this->_redirect('/user/group/show/groupID/' . $groupID);
+ } else {
+ $this->_helper->redirector('', 'group');
+ }
+ }
return;
}
}
@@ -217,12 +217,8 @@ class User_GroupController extends Zend_Controller_Action
echo "Message: " . $e->getMessage() . "
";
return;
}
- if(strpos($_SERVER['HTTP_REFERER'], '/user/group/show')) {
- if(strpos($_SERVER['HTTP_REFERER'], '/groupID/')) {
- $this->_redirect('/user/group/showall');
- } else {
- $this->_helper->redirector('changemembership', 'person');
- }
+ if(strpos($_SERVER['HTTP_REFERER'], '/user/group/show') !== false && strpos($_SERVER['HTTP_REFERER'], '/groupID/') === false) {
+ $this->_helper->redirector('changemembership', 'person');
} else {
$this->_helper->redirector('showall', 'group');
}
--
cgit v1.2.3-55-g7522