mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
Add referer capability - arrives via HTTP_GET_VARS, saved in appsession
This commit is contained in:
parent
d9c78866ac
commit
3549178505
@ -18,6 +18,23 @@
|
||||
|
||||
function index()
|
||||
{
|
||||
$referer = urldecode($GLOBALS['HTTP_GET_VARS']['referer']);
|
||||
|
||||
if($referer)
|
||||
{
|
||||
$_redir = $referer;
|
||||
$GLOBALS['phpgw']->session->appsession('session_data','admin_config',$referer);
|
||||
}
|
||||
else
|
||||
{
|
||||
$referer = $GLOBALS['phpgw']->session->appsession('session_data','admin_config');
|
||||
if($referer == '-1')
|
||||
{
|
||||
$referer = '';
|
||||
}
|
||||
$_redir = $referer ? $referer : $GLOBALS['phpgw']->link('/admin/index.php');
|
||||
}
|
||||
|
||||
switch($GLOBALS['HTTP_GET_VARS']['appname'])
|
||||
{
|
||||
case 'admin':
|
||||
@ -39,7 +56,7 @@
|
||||
case 'phpgwapi':
|
||||
case '':
|
||||
/* This keeps the admin from getting into what is a setup-only config */
|
||||
Header('Location: '.$GLOBALS['phpgw']->link('/admin/index.php'));
|
||||
Header('Location: ' . $_redir);
|
||||
break;
|
||||
default:
|
||||
$appname = $GLOBALS['HTTP_GET_VARS']['appname'];
|
||||
@ -64,7 +81,7 @@
|
||||
|
||||
if ($GLOBALS['HTTP_POST_VARS']['cancel'])
|
||||
{
|
||||
Header('Location: '.$GLOBALS['phpgw']->link('/admin/index.php'));
|
||||
Header('Location: ' . $_redir);
|
||||
}
|
||||
|
||||
if ($GLOBALS['HTTP_POST_VARS']['submit'])
|
||||
@ -118,7 +135,8 @@
|
||||
|
||||
if(!$errors)
|
||||
{
|
||||
Header('Location: '.$GLOBALS['phpgw']->link('/admin/index.php'));
|
||||
$GLOBALS['phpgw']->session->appsession('session_data','admin_config',-1);
|
||||
Header('Location: ' . $_redir);
|
||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user