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 | |
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')
19 files changed, 45 insertions, 39 deletions
diff --git a/application/modules/dev/forms/ConfirmDeleteAccount.php b/application/modules/dev/forms/ConfirmDeleteAccount.php index c093996..b82bf0b 100644 --- a/application/modules/dev/forms/ConfirmDeleteAccount.php +++ b/application/modules/dev/forms/ConfirmDeleteAccount.php @@ -18,10 +18,8 @@ class dev_Form_ConfirmDeleteAccount extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } - - } diff --git a/application/modules/dev/forms/GroupAdd.php b/application/modules/dev/forms/GroupAdd.php index 8132f3a..6c5cea9 100644 --- a/application/modules/dev/forms/GroupAdd.php +++ b/application/modules/dev/forms/GroupAdd.php @@ -56,7 +56,7 @@ class dev_Form_GroupAdd extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/GroupEdit.php b/application/modules/dev/forms/GroupEdit.php index 96784de..f375181 100644 --- a/application/modules/dev/forms/GroupEdit.php +++ b/application/modules/dev/forms/GroupEdit.php @@ -39,7 +39,7 @@ class dev_Form_GroupEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/GroupLink.php b/application/modules/dev/forms/GroupLink.php index 8a65e77..40cbc5b 100644 --- a/application/modules/dev/forms/GroupLink.php +++ b/application/modules/dev/forms/GroupLink.php @@ -46,7 +46,7 @@ class dev_Form_GroupLink extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/LinkRight.php b/application/modules/dev/forms/LinkRight.php index 0745791..e371b3a 100644 --- a/application/modules/dev/forms/LinkRight.php +++ b/application/modules/dev/forms/LinkRight.php @@ -39,7 +39,7 @@ class dev_Form_LinkRight extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/PersonEdit.php b/application/modules/dev/forms/PersonEdit.php index c04f418..0dfa5e6 100644 --- a/application/modules/dev/forms/PersonEdit.php +++ b/application/modules/dev/forms/PersonEdit.php @@ -108,7 +108,7 @@ class dev_Form_PersonEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/RoleAdd.php b/application/modules/dev/forms/RoleAdd.php index 6d43904..3e12355 100644 --- a/application/modules/dev/forms/RoleAdd.php +++ b/application/modules/dev/forms/RoleAdd.php @@ -45,7 +45,7 @@ class dev_Form_RoleAdd extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/dev/forms/RoleEdit.php b/application/modules/dev/forms/RoleEdit.php index 1a9afc5..7eb0a0e 100644 --- a/application/modules/dev/forms/RoleEdit.php +++ b/application/modules/dev/forms/RoleEdit.php @@ -53,7 +53,7 @@ class dev_Form_RoleEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } 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'); } diff --git a/application/modules/user/controllers/RoleController.php b/application/modules/user/controllers/RoleController.php index 059d9c4..38c12b0 100644 --- a/application/modules/user/controllers/RoleController.php +++ b/application/modules/user/controllers/RoleController.php @@ -2,7 +2,7 @@ class User_RoleController extends Zend_Controller_Action { - protected $userIDsNamespace; + protected $userIDsNamespace = null; public function init() { @@ -76,8 +76,8 @@ class User_RoleController extends Zend_Controller_Action } } } - //$this->_helper->redirector('', 'role'); - //return; + $this->_helper->redirector('', 'role'); + return; } } @@ -127,7 +127,15 @@ class User_RoleController 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($roleID)) { + $this->_redirect('/user/role/show/roleID/' . $roleID); + } else { + $this->_helper->redirector('', 'role'); + } + } return; } } @@ -215,7 +223,11 @@ class User_RoleController extends Zend_Controller_Action echo "Message: " . $e->getMessage() . "<br/>"; return; } - $this->_helper->redirector('', 'role'); + if(strpos($_SERVER['HTTP_REFERER'], '/user/role/show') !== false && strpos($_SERVER['HTTP_REFERER'], '/roleID/') === false) { + $this->_helper->redirector('changemembership', 'person'); + } else { + $this->_helper->redirector('', 'role'); + } return; } else { $pbsNotifier = new Pbs_Notifier(); diff --git a/application/modules/user/forms/ConfirmDeleteAccount.php b/application/modules/user/forms/ConfirmDeleteAccount.php index 7bf5a32..6237844 100644 --- a/application/modules/user/forms/ConfirmDeleteAccount.php +++ b/application/modules/user/forms/ConfirmDeleteAccount.php @@ -18,7 +18,7 @@ class user_Form_ConfirmDeleteAccount extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/GroupAdd.php b/application/modules/user/forms/GroupAdd.php index ff2b97a..b1ae0ee 100644 --- a/application/modules/user/forms/GroupAdd.php +++ b/application/modules/user/forms/GroupAdd.php @@ -56,7 +56,7 @@ class user_Form_GroupAdd extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/GroupEdit.php b/application/modules/user/forms/GroupEdit.php index 4f0d7fc..43e568b 100644 --- a/application/modules/user/forms/GroupEdit.php +++ b/application/modules/user/forms/GroupEdit.php @@ -44,7 +44,7 @@ class user_Form_GroupEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } }
\ No newline at end of file diff --git a/application/modules/user/forms/GroupLink.php b/application/modules/user/forms/GroupLink.php index 9db7ce4..9bddb19 100644 --- a/application/modules/user/forms/GroupLink.php +++ b/application/modules/user/forms/GroupLink.php @@ -46,7 +46,7 @@ class user_Form_GroupLink extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/GroupRequest.php b/application/modules/user/forms/GroupRequest.php index c9ba273..a381207 100644 --- a/application/modules/user/forms/GroupRequest.php +++ b/application/modules/user/forms/GroupRequest.php @@ -40,7 +40,7 @@ class user_Form_GroupRequest extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/LinkRight.php b/application/modules/user/forms/LinkRight.php index 8fe2f46..54aacd6 100644 --- a/application/modules/user/forms/LinkRight.php +++ b/application/modules/user/forms/LinkRight.php @@ -32,7 +32,7 @@ class user_Form_LinkRight extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/PersonEdit.php b/application/modules/user/forms/PersonEdit.php index a6bd123..7175691 100644 --- a/application/modules/user/forms/PersonEdit.php +++ b/application/modules/user/forms/PersonEdit.php @@ -108,7 +108,7 @@ class user_Form_PersonEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/RoleAdd.php b/application/modules/user/forms/RoleAdd.php index 9a9570c..5968b47 100644 --- a/application/modules/user/forms/RoleAdd.php +++ b/application/modules/user/forms/RoleAdd.php @@ -62,7 +62,7 @@ class user_Form_RoleAdd extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } diff --git a/application/modules/user/forms/RoleEdit.php b/application/modules/user/forms/RoleEdit.php index 0bdc977..938ebce 100644 --- a/application/modules/user/forms/RoleEdit.php +++ b/application/modules/user/forms/RoleEdit.php @@ -58,7 +58,7 @@ class user_Form_RoleEdit extends Zend_Form 'required' => false, 'ignore' => true, 'label' => 'Cancel', - 'onclick' => 'location.href="' . $_SERVER['HTTP_REFERER'] . '"', + 'onclick' => 'location.href="javascript:history.back();"', )); } |