add autologin for anonymous user as we need to have on community.egroupware.org

This commit is contained in:
Cornelius Weiß 2006-06-07 18:15:50 +00:00
parent 6623ad4b8a
commit 857c4bf685
2 changed files with 21 additions and 5 deletions

View File

@ -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)

View File

@ -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>