mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
implemented automatical forwarding into eGW after a login was necessary, because no session existed
This commit is contained in:
parent
b7890a9ba4
commit
dfdfaad414
13
home.php
13
home.php
@ -38,19 +38,6 @@
|
|||||||
include('header.inc.php');
|
include('header.inc.php');
|
||||||
$GLOBALS['phpgw_info']['flags']['app_header']=lang('home');
|
$GLOBALS['phpgw_info']['flags']['app_header']=lang('home');
|
||||||
|
|
||||||
if ($_GET['phpgw_forward'])
|
|
||||||
{
|
|
||||||
foreach($_GET as $name => $value)
|
|
||||||
{
|
|
||||||
if (ereg('phpgw_',$name))
|
|
||||||
{
|
|
||||||
$extra_vars .= '&' . $name . '=' . urlencode($value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$GLOBALS['phpgw']->redirect_link($_GET['phpgw_forward'],$extra_vars);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// anonymous user should never get a home-page
|
// anonymous user should never get a home-page
|
||||||
if ($GLOBALS['phpgw']->session->session_flags == 'A')
|
if ($GLOBALS['phpgw']->session->session_flags == 'A')
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,8 @@
|
|||||||
$GLOBALS['sessionid'] = isset($_GET['sessionid']) ? $_GET['sessionid'] : @$_COOKIE['sessionid'];
|
$GLOBALS['sessionid'] = isset($_GET['sessionid']) ? $_GET['sessionid'] : @$_COOKIE['sessionid'];
|
||||||
if(!$GLOBALS['sessionid'])
|
if(!$GLOBALS['sessionid'])
|
||||||
{
|
{
|
||||||
Header('Location: login.php');
|
Header('Location: login.php'.
|
||||||
|
(isset($_SERVER['QUERY_STRING']) ? '?phpgw_forward='.urlencode('/index.php?'.$_SERVER['QUERY_STRING']):''));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
41
login.php
41
login.php
@ -54,15 +54,15 @@
|
|||||||
$deny_msg=lang('Oops! You caught us in the middle of system maintainance.<br/>
|
$deny_msg=lang('Oops! You caught us in the middle of system maintainance.<br/>
|
||||||
Please, check back with us shortly.');
|
Please, check back with us shortly.');
|
||||||
|
|
||||||
$tmpl->set_file(array
|
$tmpl->set_file(array
|
||||||
(
|
(
|
||||||
'login_form' => 'login_denylogin.tpl'
|
'login_form' => 'login_denylogin.tpl'
|
||||||
));
|
));
|
||||||
|
|
||||||
$tmpl->set_var('template_set','default');
|
$tmpl->set_var('template_set','default');
|
||||||
$tmpl->set_var('deny_msg',$deny_msg);
|
$tmpl->set_var('deny_msg',$deny_msg);
|
||||||
$tmpl->pfp('loginout','login_form');
|
$tmpl->pfp('loginout','login_form');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$tmpl->set_file(array('login_form' => 'login.tpl'));
|
$tmpl->set_file(array('login_form' => 'login.tpl'));
|
||||||
|
|
||||||
@ -224,25 +224,18 @@
|
|||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->preferences->add('common','lang',$_POST['lang'],'session');
|
$GLOBALS['phpgw']->preferences->add('common','lang',$_POST['lang'],'session');
|
||||||
}
|
}
|
||||||
$forward = get_var('phpgw_forward', array('GET', 'POST'), 0);
|
|
||||||
if($forward)
|
|
||||||
{
|
|
||||||
$extra_vars['phpgw_forward'] = $forward;
|
|
||||||
foreach($_GET as $name => $value)
|
|
||||||
{
|
|
||||||
if(ereg('phpgw_',$name))
|
|
||||||
{
|
|
||||||
$extra_vars[$name] = urlencode($value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(!$GLOBALS['phpgw_info']['server']['disable_autoload_langfiles'])
|
if(!$GLOBALS['phpgw_info']['server']['disable_autoload_langfiles'])
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->translation->autoload_changed_langfiles();
|
$GLOBALS['phpgw']->translation->autoload_changed_langfiles();
|
||||||
}
|
}
|
||||||
$extra_vars['cd'] = 'yes';
|
$forward = isset($_GET['phpgw_forward']) ? urldecode($_GET['phpgw_forward']) : @$_POST['phpgw_forward'];
|
||||||
|
if (!$forward)
|
||||||
$GLOBALS['phpgw']->redirect_link('/home.php', $extra_vars);
|
{
|
||||||
|
$extra_vars['cd'] = 'yes';
|
||||||
|
$forward = '/home.php';
|
||||||
|
}
|
||||||
|
$GLOBALS['phpgw']->redirect_link($forward,$extra_vars);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -325,7 +318,7 @@
|
|||||||
|
|
||||||
if($extra_vars)
|
if($extra_vars)
|
||||||
{
|
{
|
||||||
$extra_vars = '?' . substr($extra_vars,1,strlen($extra_vars));
|
$extra_vars = '?' . substr($extra_vars,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************\
|
/********************************************************\
|
||||||
|
@ -293,7 +293,12 @@
|
|||||||
{
|
{
|
||||||
if (! $GLOBALS['phpgw']->session->verify())
|
if (! $GLOBALS['phpgw']->session->verify())
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->redirect_link('/login.php','cd=10');
|
list(,$relpath) = explode($GLOBALS['phpgw_info']['server']['webserver_url'],$_SERVER['PHP_SELF'],2);
|
||||||
|
$args = array(
|
||||||
|
'cd' => 10,
|
||||||
|
'phpgw_forward' => urlencode('/'.$relpath.(isset($_SERVER['QUERY_STRING']) ? '?'.$_SERVER['QUERY_STRING'] : ''))
|
||||||
|
);
|
||||||
|
$GLOBALS['phpgw']->redirect_link('/login.php',$args);
|
||||||
}
|
}
|
||||||
|
|
||||||
$GLOBALS['phpgw']->datetime = CreateObject('phpgwapi.datetime');
|
$GLOBALS['phpgw']->datetime = CreateObject('phpgwapi.datetime');
|
||||||
|
Loading…
Reference in New Issue
Block a user