Fix double 'http://' in logo_url if using default value

This commit is contained in:
Miles Lott 2003-10-30 14:43:16 +00:00
parent fc5f8e4682
commit 4aca7673e7
2 changed files with 43 additions and 44 deletions

View File

@ -12,17 +12,17 @@
/* $Id$ */ /* $Id$ */
$bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '" alink="' $bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '" alink="'
. $GLOBALS['phpgw_info']['theme']['alink'] . '" link="' . $GLOBALS['phpgw_info']['theme']['link'] . '" vlink="' . $GLOBALS['phpgw_info']['theme']['alink'] . '" link="' . $GLOBALS['phpgw_info']['theme']['link'] . '" vlink="'
. $GLOBALS['phpgw_info']['theme']['vlink'] . '"'; . $GLOBALS['phpgw_info']['theme']['vlink'] . '"';
if (! $GLOBALS['phpgw_info']['server']['htmlcompliant']) if(!$GLOBALS['phpgw_info']['server']['htmlcompliant'])
{ {
$bodyheader .= ''; $bodyheader .= '';
} }
#_debug_array($GLOBALS['phpgw_info']['user']['preferences']['common']); #_debug_array($GLOBALS['phpgw_info']['user']['preferences']['common']);
$theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css'; $theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
if (!file_exists($theme_css)) if(!file_exists($theme_css))
{ {
$theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css'; $theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
} }
@ -36,17 +36,17 @@
$app = $GLOBALS['phpgw_info']['flags']['currentapp']; $app = $GLOBALS['phpgw_info']['flags']['currentapp'];
$app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':''; $app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':'';
$var = Array ( $var = Array(
'img_icon' => PHPGW_IMAGES_DIR . '/favicon.ico', 'img_icon' => PHPGW_IMAGES_DIR . '/favicon.ico',
'img_shortcut' => PHPGW_IMAGES_DIR . '/favicon.ico', 'img_shortcut' => PHPGW_IMAGES_DIR . '/favicon.ico',
'pngfix' => $pngfix, 'pngfix' => $pngfix,
'charset' => $GLOBALS['phpgw']->translation->charset(), 'charset' => $GLOBALS['phpgw']->translation->charset(),
'font_family' => $GLOBALS['phpgw_info']['theme']['font'], 'font_family' => $GLOBALS['phpgw_info']['theme']['font'],
'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app, 'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app,
'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(), 'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
'theme_css' => $theme_css, 'theme_css' => $theme_css,
'css' => $GLOBALS['phpgw']->common->get_css(), 'css' => $GLOBALS['phpgw']->common->get_css(),
'java_script' => $GLOBALS['phpgw']->common->get_java_script(), 'java_script' => $GLOBALS['phpgw']->common->get_java_script(),
); );
$tpl->set_var($var); $tpl->set_var($var);
$tpl->pfp('out','head'); $tpl->pfp('out','head');

View File

@ -35,24 +35,24 @@
// == 'icons_and_text') // == 'icons_and_text')
foreach($GLOBALS['phpgw_info']['navbar'] as $app => $app_data) foreach($GLOBALS['phpgw_info']['navbar'] as $app => $app_data)
{ {
if ($app != 'home' && $app != 'preferences' && $app != 'about' && $app != 'logout') if($app != 'home' && $app != 'preferences' && $app != 'about' && $app != 'logout')
{ {
$title = $GLOBALS['phpgw_info']['apps'][$app]['title']; $title = $GLOBALS['phpgw_info']['apps'][$app]['title'];
$icon = '<img src="' . $app_data['icon'] . '" alt="' . $title . $icon = '<img src="' . $app_data['icon'] . '" alt="' . $title
'" title="'. $title . '" border="0" />'; . '" title="'. $title . '" border="0" />';
$app_icons .= '<td height="66" valign="bottom" align="center"><a href="' . $app_data['url'] . '"'; $app_icons .= '<td height="66" valign="bottom" align="center"><a href="' . $app_data['url'] . '"';
if (isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) &&
$GLOBALS['phpgw_info']['flags']['navbar_target']) $GLOBALS['phpgw_info']['flags']['navbar_target'])
{ {
$app_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"'; $app_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
} }
$app_icons .= '>' . $icon . '</a></td>'; $app_icons .= '>' . $icon . '</a></td>';
$app_titles .= '<td align=center valign="top" class="appTitles"><a href="'.$app_data['url'] . '"'; $app_titles .= '<td align=center valign="top" class="appTitles"><a href="'.$app_data['url'] . '"';
if (isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) &&
$GLOBALS['phpgw_info']['flags']['navbar_target']) $GLOBALS['phpgw_info']['flags']['navbar_target'])
{ {
$app_titles .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"'; $app_titles .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
} }
@ -68,7 +68,7 @@
{ {
$var['app_titles'] = $app_titles; $var['app_titles'] = $app_titles;
} }
if (isset($GLOBALS['phpgw_info']['flags']['app_header'])) if(isset($GLOBALS['phpgw_info']['flags']['app_header']))
{ {
$var['current_app_title'] = $GLOBALS['phpgw_info']['flags']['app_header']; $var['current_app_title'] = $GLOBALS['phpgw_info']['flags']['app_header'];
} }
@ -77,7 +77,7 @@
$var['current_app_title']=$GLOBALS['phpgw_info']['navbar'][$GLOBALS['phpgw_info']['flags']['currentapp']]['title']; $var['current_app_title']=$GLOBALS['phpgw_info']['navbar'][$GLOBALS['phpgw_info']['flags']['currentapp']]['title'];
} }
if (isset($GLOBALS['phpgw_info']['navbar']['admin']) && $GLOBALS['phpgw_info']['user']['preferences']['common']['show_currentusers']) if(isset($GLOBALS['phpgw_info']['navbar']['admin']) && $GLOBALS['phpgw_info']['user']['preferences']['common']['show_currentusers'])
{ {
$var['current_users'] = '<a href="' $var['current_users'] = '<a href="'
. $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') . '">' . $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') . '">'
@ -85,28 +85,28 @@
} }
$now = time(); $now = time();
$var['user_info'] = '<b>'.$GLOBALS['phpgw']->common->display_fullname() .'</b>'. ' - ' $var['user_info'] = '<b>'.$GLOBALS['phpgw']->common->display_fullname() .'</b>'. ' - '
. lang($GLOBALS['phpgw']->common->show_date($now,'l')) . ' ' . lang($GLOBALS['phpgw']->common->show_date($now,'l')) . ' '
. $GLOBALS['phpgw']->common->show_date($now,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']); . $GLOBALS['phpgw']->common->show_date($now,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
if ($GLOBALS['phpgw_info']['user']['lastpasswd_change'] == 0) if($GLOBALS['phpgw_info']['user']['lastpasswd_change'] == 0)
{ {
$api_messages = lang('You are required to change your password during your first login') $api_messages = lang('You are required to change your password during your first login')
. '<br> Click this image on the navbar: <img src="' . '<br> Click this image on the navbar: <img src="'
. $GLOBALS['phpgw']->common->image('preferences','navbar.gif').'">'; . $GLOBALS['phpgw']->common->image('preferences','navbar.gif').'">';
} }
else if ($GLOBALS['phpgw_info']['user']['lastpasswd_change'] < time() - (86400*30)) elseif($GLOBALS['phpgw_info']['user']['lastpasswd_change'] < time() - (86400*30))
{ {
$api_messages = lang('it has been more then %1 days since you changed your password',30); $api_messages = lang('it has been more then %1 days since you changed your password',30);
} }
// This is gonna change // This is gonna change
if (isset($cd)) if(isset($cd))
{ {
$var['messages'] = $api_messages . '<br>' . checkcode($cd); $var['messages'] = $api_messages . '<br>' . checkcode($cd);
} }
$var['logo_file'] = $GLOBALS['phpgw']->common->image('phpgwapi',$GLOBALS['phpgw_info']['server']['login_logo_file']?$GLOBALS['phpgw_info']['server']['login_logo_file']:'logo'); $var['logo_file'] = $GLOBALS['phpgw']->common->image('phpgwapi',$GLOBALS['phpgw_info']['server']['login_logo_file']?$GLOBALS['phpgw_info']['server']['login_logo_file']:'logo');
$var['logo_url'] = $GLOBALS['phpgw_info']['server']['login_logo_url']?$GLOBALS['phpgw_info']['server']['login_logo_url']:'http://www.eGroupWare.org'; $var['logo_url'] = $GLOBALS['phpgw_info']['server']['login_logo_url']?$GLOBALS['phpgw_info']['server']['login_logo_url']:'www.eGroupWare.org';
$var['logo_title'] = $GLOBALS['phpgw_info']['server']['login_logo_title']?$GLOBALS['phpgw_info']['server']['login_logo_title']:'www.eGroupWare.org'; $var['logo_title'] = $GLOBALS['phpgw_info']['server']['login_logo_title']?$GLOBALS['phpgw_info']['server']['login_logo_title']:'www.eGroupWare.org';
$GLOBALS['idots_tpl']->set_var($var); $GLOBALS['idots_tpl']->set_var($var);
@ -115,7 +115,7 @@
$menu_title = lang('General Menu'); $menu_title = lang('General Menu');
$file['Home'] = $GLOBALS['phpgw_info']['navbar']['home']['url']; $file['Home'] = $GLOBALS['phpgw_info']['navbar']['home']['url'];
if ($GLOBALS['phpgw_info']['user']['apps']['preferences']) if($GLOBALS['phpgw_info']['user']['apps']['preferences'])
{ {
$file['Preferences'] = $GLOBALS['phpgw_info']['navbar']['preferences']['url']; $file['Preferences'] = $GLOBALS['phpgw_info']['navbar']['preferences']['url'];
} }
@ -131,10 +131,10 @@
$GLOBALS['idots_tpl']->pparse('out','navbar_footer'); $GLOBALS['idots_tpl']->pparse('out','navbar_footer');
// If the application has a header include, we now include it // If the application has a header include, we now include it
if (!@$GLOBALS['phpgw_info']['flags']['noappheader'] && @isset($GLOBALS['HTTP_GET_VARS']['menuaction'])) if(!@$GLOBALS['phpgw_info']['flags']['noappheader'] && @isset($GLOBALS['HTTP_GET_VARS']['menuaction']))
{ {
list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']); list($app,$class,$method) = explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']);
if (is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header']) if(is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions['header'])
{ {
$GLOBALS[$class]->header(); $GLOBALS[$class]->header();
} }
@ -145,7 +145,6 @@
function display_sidebox($appname,$menu_title,$file) function display_sidebox($appname,$menu_title,$file)
{ {
if(!$appname || ($appname==$GLOBALS['phpgw_info']['flags']['currentapp'] && $file)) if(!$appname || ($appname==$GLOBALS['phpgw_info']['flags']['currentapp'] && $file))
{ {
$var['lang_title']=$menu_title;//$appname.' '.lang('Menu'); $var['lang_title']=$menu_title;//$appname.' '.lang('Menu');
@ -170,9 +169,9 @@
else else
{ {
$var['icon_or_star']='<img src="'.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images'.'/orange-ball.png" width="9" height="9" alt="ball"/>'; $var['icon_or_star']='<img src="'.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images'.'/orange-ball.png" width="9" height="9" alt="ball"/>';
if (is_array($item_link)) if(is_array($item_link))
{ {
if (isset($item_link['icon'])) if(isset($item_link['icon']))
{ {
$app = isset($item_link['app']) ? $item_link['app'] : $GLOBALS['phpgw_info']['flags']['currentapp']; $app = isset($item_link['app']) ? $item_link['app'] : $GLOBALS['phpgw_info']['flags']['currentapp'];
$var['icon_or_star'] = '<img src="'.$GLOBALS['phpgw']->common->image($app,$item_link['icon']).'">'; $var['icon_or_star'] = '<img src="'.$GLOBALS['phpgw']->common->image($app,$item_link['icon']).'">';
@ -200,9 +199,9 @@
) )
); );
$var = Array( $var = Array(
'img_root' => $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images', 'img_root' => $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images',
'table_bg_color' => $GLOBALS['phpgw_info']['theme']['navbar_bg'], 'table_bg_color' => $GLOBALS['phpgw_info']['theme']['navbar_bg'],
'version' => $GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] 'version' => $GLOBALS['phpgw_info']['server']['versions']['phpgwapi']
); );
$GLOBALS['phpgw']->hooks->process('navbar_end'); $GLOBALS['phpgw']->hooks->process('navbar_end');