forked from extern/egroupware
Fix double 'http://' in logo_url if using default value
This commit is contained in:
parent
fc5f8e4682
commit
4aca7673e7
@ -12,23 +12,23 @@
|
||||
/* $Id$ */
|
||||
|
||||
$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']['vlink'] . '"';
|
||||
. $GLOBALS['phpgw_info']['theme']['alink'] . '" link="' . $GLOBALS['phpgw_info']['theme']['link'] . '" vlink="'
|
||||
. $GLOBALS['phpgw_info']['theme']['vlink'] . '"';
|
||||
|
||||
if (! $GLOBALS['phpgw_info']['server']['htmlcompliant'])
|
||||
if(!$GLOBALS['phpgw_info']['server']['htmlcompliant'])
|
||||
{
|
||||
$bodyheader .= '';
|
||||
}
|
||||
|
||||
#_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';
|
||||
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';
|
||||
}
|
||||
|
||||
$pngfix = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/js/pngfix.js';
|
||||
|
||||
|
||||
$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||
$tpl->set_unknowns('remove');
|
||||
$tpl->set_file(array('head' => 'head.tpl'));
|
||||
@ -36,17 +36,17 @@
|
||||
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
|
||||
$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_shortcut' => PHPGW_IMAGES_DIR . '/favicon.ico',
|
||||
'pngfix' => $pngfix,
|
||||
'pngfix' => $pngfix,
|
||||
'charset' => $GLOBALS['phpgw']->translation->charset(),
|
||||
'font_family' => $GLOBALS['phpgw_info']['theme']['font'],
|
||||
'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app,
|
||||
'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
|
||||
'theme_css' => $theme_css,
|
||||
'css' => $GLOBALS['phpgw']->common->get_css(),
|
||||
'java_script' => $GLOBALS['phpgw']->common->get_java_script(),
|
||||
'font_family' => $GLOBALS['phpgw_info']['theme']['font'],
|
||||
'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app,
|
||||
'body_tags' => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
|
||||
'theme_css' => $theme_css,
|
||||
'css' => $GLOBALS['phpgw']->common->get_css(),
|
||||
'java_script' => $GLOBALS['phpgw']->common->get_java_script(),
|
||||
);
|
||||
$tpl->set_var($var);
|
||||
$tpl->pfp('out','head');
|
||||
|
@ -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,24 +35,24 @@
|
||||
// == 'icons_and_text')
|
||||
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'];
|
||||
|
||||
$icon = '<img src="' . $app_data['icon'] . '" alt="' . $title .
|
||||
'" title="'. $title . '" border="0" />';
|
||||
$icon = '<img src="' . $app_data['icon'] . '" alt="' . $title
|
||||
. '" title="'. $title . '" border="0" />';
|
||||
|
||||
$app_icons .= '<td height="66" valign="bottom" align="center"><a href="' . $app_data['url'] . '"';
|
||||
if (isset($GLOBALS['phpgw_info']['flags']['navbar_target']) &&
|
||||
$GLOBALS['phpgw_info']['flags']['navbar_target'])
|
||||
if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) &&
|
||||
$GLOBALS['phpgw_info']['flags']['navbar_target'])
|
||||
{
|
||||
$app_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
|
||||
}
|
||||
$app_icons .= '>' . $icon . '</a></td>';
|
||||
|
||||
$app_titles .= '<td align=center valign="top" class="appTitles"><a href="'.$app_data['url'] . '"';
|
||||
if (isset($GLOBALS['phpgw_info']['flags']['navbar_target']) &&
|
||||
$GLOBALS['phpgw_info']['flags']['navbar_target'])
|
||||
if(isset($GLOBALS['phpgw_info']['flags']['navbar_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;
|
||||
}
|
||||
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'];
|
||||
}
|
||||
@ -77,7 +77,7 @@
|
||||
$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="'
|
||||
. $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') . '">'
|
||||
@ -85,28 +85,28 @@
|
||||
}
|
||||
$now = time();
|
||||
$var['user_info'] = '<b>'.$GLOBALS['phpgw']->common->display_fullname() .'</b>'. ' - '
|
||||
. lang($GLOBALS['phpgw']->common->show_date($now,'l')) . ' '
|
||||
. $GLOBALS['phpgw']->common->show_date($now,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
|
||||
. lang($GLOBALS['phpgw']->common->show_date($now,'l')) . ' '
|
||||
. $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')
|
||||
. '<br> Click this image on the navbar: <img src="'
|
||||
. $GLOBALS['phpgw']->common->image('preferences','navbar.gif').'">';
|
||||
. '<br> Click this image on the navbar: <img src="'
|
||||
. $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);
|
||||
}
|
||||
|
||||
// This is gonna change
|
||||
if (isset($cd))
|
||||
if(isset($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_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';
|
||||
|
||||
$GLOBALS['idots_tpl']->set_var($var);
|
||||
@ -115,7 +115,7 @@
|
||||
$menu_title = lang('General Menu');
|
||||
|
||||
$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'];
|
||||
}
|
||||
@ -125,16 +125,16 @@
|
||||
);
|
||||
|
||||
display_sidebox('',$menu_title,$file);
|
||||
|
||||
|
||||
$GLOBALS['phpgw']->hooks->single('sidebox_menu',$GLOBALS['phpgw_info']['flags']['currentapp']);
|
||||
|
||||
$GLOBALS['idots_tpl']->pparse('out','navbar_footer');
|
||||
|
||||
// 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']);
|
||||
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();
|
||||
}
|
||||
@ -145,13 +145,12 @@
|
||||
|
||||
function display_sidebox($appname,$menu_title,$file)
|
||||
{
|
||||
|
||||
if(!$appname || ($appname==$GLOBALS['phpgw_info']['flags']['currentapp'] && $file))
|
||||
{
|
||||
$var['lang_title']=$menu_title;//$appname.' '.lang('Menu');
|
||||
$GLOBALS['idots_tpl']->set_var($var);
|
||||
$GLOBALS['idots_tpl']->pfp('out','extra_blocks_header');
|
||||
|
||||
|
||||
foreach($file as $text => $url)
|
||||
{
|
||||
sidebox_menu_item($url,$text);
|
||||
@ -170,9 +169,9 @@
|
||||
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"/>';
|
||||
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'];
|
||||
$var['icon_or_star'] = '<img src="'.$GLOBALS['phpgw']->common->image($app,$item_link['icon']).'">';
|
||||
@ -185,11 +184,11 @@
|
||||
$var['lang_item']=lang($item_text);
|
||||
$var['item_link']=$item_link;
|
||||
}
|
||||
$GLOBALS['idots_tpl']->set_var($var);
|
||||
$GLOBALS['idots_tpl']->set_var($var);
|
||||
$GLOBALS['idots_tpl']->pparse('out','extra_block_row');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function parse_navbar_end()
|
||||
{
|
||||
$GLOBALS['idots_tpl'] = createobject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
|
||||
@ -200,9 +199,9 @@
|
||||
)
|
||||
);
|
||||
$var = Array(
|
||||
'img_root' => $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images',
|
||||
'table_bg_color' => $GLOBALS['phpgw_info']['theme']['navbar_bg'],
|
||||
'version' => $GLOBALS['phpgw_info']['server']['versions']['phpgwapi']
|
||||
'img_root' => $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/idots/images',
|
||||
'table_bg_color' => $GLOBALS['phpgw_info']['theme']['navbar_bg'],
|
||||
'version' => $GLOBALS['phpgw_info']['server']['versions']['phpgwapi']
|
||||
);
|
||||
$GLOBALS['phpgw']->hooks->process('navbar_end');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user