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

@ -20,7 +20,7 @@
'navbar' => 'navbar.tpl'
)
);
$GLOBALS['idots_tpl']->set_block('navbar','navbar_header','navbar_header');
$GLOBALS['idots_tpl']->set_block('navbar','extra_blocks_header','extra_block_header');
$GLOBALS['idots_tpl']->set_block('navbar','extra_block_row','extra_block_row');
@ -35,7 +35,7 @@
$var['img_root'] = $GLOBALS['egw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images';
$var['table_bg_color'] = $GLOBALS['egw_info']['theme']['navbar_bg'];
if($GLOBALS['egw_info']['user']['preferences']['common']['click_or_onmouseover']=='onmouseover')
{
$show_menu_event = 'onMouseOver';
@ -45,7 +45,20 @@
$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 = '';
// == 'icons_and_text')
@ -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_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,
'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)

View File

@ -5,6 +5,9 @@
<div id="divMain">
<div id="divUpperTabs">
{upper_tabs}
</div>
<div id="divAppIconBar">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-top: 7px">
<tr>