mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 09:38:53 +01:00
add autologin for anonymous user as we need to have on community.egroupware.org
This commit is contained in:
parent
6623ad4b8a
commit
857c4bf685
@ -45,6 +45,19 @@
|
|||||||
$show_menu_event = 'onClick';
|
$show_menu_event = 'onClick';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($GLOBALS['egw_info']['user']['userid'] == 'anonymous')
|
||||||
|
{
|
||||||
|
$cnf_reg =& CreateObject('phpgwapi.config','registration');
|
||||||
|
$cnf_reg->read_repository();
|
||||||
|
$config_reg = $cnf_reg->config_data;
|
||||||
|
|
||||||
|
$GLOBALS['idots_tpl']->set_var('upper_tabs','
|
||||||
|
<ul>
|
||||||
|
<li><a href="'.$GLOBALS['egw']->link('/logout.php').'">'.lang('Login').'</a></li>'.
|
||||||
|
( ($config_reg[enable_registration]=='True' && $config_reg[register_link]=='True') ? '<li><a href="'.$GLOBALS['egw']->link('/registration/index.php').'">'.lang('Register').'</a></li>' : '').'
|
||||||
|
</ul>
|
||||||
|
');
|
||||||
|
}
|
||||||
|
|
||||||
$applications = '';
|
$applications = '';
|
||||||
|
|
||||||
@ -147,7 +160,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($GLOBALS['egw_info']['user']['preferences']['common']['start_and_logout_icons']!='no')
|
if($GLOBALS['egw_info']['user']['preferences']['common']['start_and_logout_icons']!='no' && $GLOBALS['egw_info']['user']['userid'] != 'anonymous')
|
||||||
{
|
{
|
||||||
$app_icons .= '<td width="'.$tdwidth.'%" height="32" valign="bottom" align="center" style="text-align:center"><a href="'.$GLOBALS['egw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBALS['egw_info']['navbar']['logout']['icon'].'" title="'.$GLOBALS['egw_info']['navbar']['logout']['title'].'" alt="'.$GLOBALS['egw_info']['navbar']['logout']['title'].'"></a></td>';
|
$app_icons .= '<td width="'.$tdwidth.'%" height="32" valign="bottom" align="center" style="text-align:center"><a href="'.$GLOBALS['egw_info']['navbar']['logout']['url'].'"><img src="'.$GLOBALS['egw_info']['navbar']['logout']['icon'].'" title="'.$GLOBALS['egw_info']['navbar']['logout']['title'].'" alt="'.$GLOBALS['egw_info']['navbar']['logout']['title'].'"></a></td>';
|
||||||
$app_titles .= '<td align="center" valign="top" class="appTitles" style="text-align:center"><a href="'.$GLOBALS['egw_info']['navbar']['logout']['url'].'">'.$GLOBALS['egw_info']['navbar']['logout']['title'].'</a></td>';
|
$app_titles .= '<td align="center" valign="top" class="appTitles" style="text-align:center"><a href="'.$GLOBALS['egw_info']['navbar']['logout']['url'].'">'.$GLOBALS['egw_info']['navbar']['logout']['title'].'</a></td>';
|
||||||
@ -267,7 +280,7 @@
|
|||||||
'no_lang' => True,
|
'no_lang' => True,
|
||||||
'link' => $GLOBALS['egw_info']['navbar']['about']['url']
|
'link' => $GLOBALS['egw_info']['navbar']['about']['url']
|
||||||
),
|
),
|
||||||
'Logout'=>$GLOBALS['egw_info']['navbar']['logout']['url']
|
$GLOBALS['egw_info']['user']['userid'] != 'anonymous' ? 'Logout' : 'Login' =>$GLOBALS['egw_info']['navbar']['logout']['url']
|
||||||
);
|
);
|
||||||
|
|
||||||
if($GLOBALS['egw_info']['user']['preferences']['common']['auto_hide_sidebox']==1)
|
if($GLOBALS['egw_info']['user']['preferences']['common']['auto_hide_sidebox']==1)
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
|
|
||||||
<div id="divMain">
|
<div id="divMain">
|
||||||
|
<div id="divUpperTabs">
|
||||||
|
{upper_tabs}
|
||||||
|
</div>
|
||||||
<div id="divAppIconBar">
|
<div id="divAppIconBar">
|
||||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-top: 7px">
|
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-top: 7px">
|
||||||
<tr>
|
<tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user