diff options
| author | Björn Geiger | 2011-04-05 12:39:09 +0200 |
|---|---|---|
| committer | Björn Geiger | 2011-04-05 12:39:09 +0200 |
| commit | 6cd23be5bc8f936e1a76c6d01bbc79ef827fc6f6 (patch) | |
| tree | 41f1c07776dd4d38acfc0965611f725863d42de4 /application/modules/user/controllers/GroupController.php | |
| parent | Rechte korrigiert, LeaveGroup Recht eingeführt (diff) | |
| download | pbs2-6cd23be5bc8f936e1a76c6d01bbc79ef827fc6f6.tar.gz pbs2-6cd23be5bc8f936e1a76c6d01bbc79ef827fc6f6.tar.xz pbs2-6cd23be5bc8f936e1a76c6d01bbc79ef827fc6f6.zip | |
HTTP-Referer entfernt bzw. Übeprüfung auf vorhanden sein von ['HTTP-Referer']
Diffstat (limited to 'application/modules/user/controllers/GroupController.php')
| -rw-r--r-- | application/modules/user/controllers/GroupController.php | 26 |
1 files changed, 11 insertions, 15 deletions
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() . "<br/>"; 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() . "<br/>"; 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'); } |
