mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-13 16:59:35 +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()
|
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'])
|
switch($GLOBALS['HTTP_GET_VARS']['appname'])
|
||||||
{
|
{
|
||||||
case 'admin':
|
case 'admin':
|
||||||
@ -39,7 +56,7 @@
|
|||||||
case 'phpgwapi':
|
case 'phpgwapi':
|
||||||
case '':
|
case '':
|
||||||
/* This keeps the admin from getting into what is a setup-only config */
|
/* 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;
|
break;
|
||||||
default:
|
default:
|
||||||
$appname = $GLOBALS['HTTP_GET_VARS']['appname'];
|
$appname = $GLOBALS['HTTP_GET_VARS']['appname'];
|
||||||
@ -64,7 +81,7 @@
|
|||||||
|
|
||||||
if ($GLOBALS['HTTP_POST_VARS']['cancel'])
|
if ($GLOBALS['HTTP_POST_VARS']['cancel'])
|
||||||
{
|
{
|
||||||
Header('Location: '.$GLOBALS['phpgw']->link('/admin/index.php'));
|
Header('Location: ' . $_redir);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($GLOBALS['HTTP_POST_VARS']['submit'])
|
if ($GLOBALS['HTTP_POST_VARS']['submit'])
|
||||||
@ -118,7 +135,8 @@
|
|||||||
|
|
||||||
if(!$errors)
|
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();
|
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user