This commit is contained in:
ceb 2002-10-29 23:11:21 +00:00
parent 27031e5523
commit aa1dc9eb33
2 changed files with 41 additions and 44 deletions

View File

@ -27,6 +27,19 @@
exit;
}
if ($GLOBALS['phpgw_info']['server']['force_default_app'] && $GLOBALS['phpgw_info']['server']['force_default_app'] != 'user_choice')
{
$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] = $GLOBALS['phpgw_info']['server']['force_default_app'];
}
if ($GLOBALS['HTTP_GET_VARS']['cd']=='yes' && $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app']
&& $GLOBALS['phpgw_info']['user']['apps'][$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app']])
{
//$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] . '/' . 'index.php'));
Header('Location: ' . $GLOBALS['phpgw']->link('/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] . '/' . 'index.php'));
}
else
{
$GLOBALS['phpgw_info']['flags'] = array
(
'noheader' => True,
@ -50,17 +63,6 @@
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link($GLOBALS['phpgw_forward'],$extra_vars));
}
if ($GLOBALS['phpgw_info']['server']['force_default_app'] && $GLOBALS['phpgw_info']['server']['force_default_app'] != 'user_choice')
{
$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] = $GLOBALS['phpgw_info']['server']['force_default_app'];
}
if ($GLOBALS['HTTP_GET_VARS']['cd']=='yes' && $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app']
&& $GLOBALS['phpgw_info']['user']['apps'][$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app']])
{
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] . '/' . 'index.php'));
}
$GLOBALS['phpgw']->translation->add_app('mainscreen');
if (lang('mainscreen_message') != 'mainscreen_message'.lang_char())
{
@ -211,8 +213,6 @@
$GLOBALS['phpgw']->preferences->save_repository();
}
if (!$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'])
{
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',$GLOBALS['phpgw']->portalbox->output);
}
?>

View File

@ -1240,10 +1240,7 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
switch($GLOBALS['phpgw_info']['flags']['currentapp'])
{
case 'home':
if (!$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'])
{
$var['home'] = True;
}
break;
case 'about':
$var['about'] = True;