From 498bd2bf45b5cdfa2a6dcfeb9c284463b922ba26 Mon Sep 17 00:00:00 2001 From: Pim Snel Date: Fri, 16 Jan 2004 14:23:35 +0000 Subject: [PATCH] fixed display of wrong logo --- login.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/login.php b/login.php index 656978da4d..506ac1e5f7 100755 --- a/login.php +++ b/login.php @@ -342,8 +342,25 @@ $tmpl->set_var('template_set',$GLOBALS['phpgw_info']['login_template_set']); $tmpl->set_var('bg_color',($GLOBALS['phpgw_info']['server']['login_bg_color']?$GLOBALS['phpgw_info']['server']['login_bg_color']:'FFFFFF')); $tmpl->set_var('bg_color_title',($GLOBALS['phpgw_info']['server']['login_bg_color_title']?$GLOBALS['phpgw_info']['server']['login_bg_color_title']:'486591')); - $tmpl->set_var('logo_url',($GLOBALS['phpgw_info']['server']['login_logo_url']?$GLOBALS['phpgw_info']['server']['login_logo_url']:'www.egroupware.org')); - $tmpl->set_var('logo_file',$GLOBALS['phpgw']->common->image('phpgwapi',$GLOBALS['phpgw_info']['server']['login_logo_file']?$GLOBALS['phpgw_info']['server']['login_logo_file']:'logo')); + $tmpl->set_var('logo_url',($GLOBALS['phpgw_info']['server']['login_logo_url']?$GLOBALS['phpgw_info']['server']['login_logo_url']:'http://www.egroupware.org')); + + // retrieve logo from login template set + // FIXME $GLOBALS['phpgw']->common->image must get extra argument: force to look in this template set thirst + $template_logo_file=$GLOBALS['phpgw_info']['server']['webserver_url'].'/phpgwapi/templates/'.$GLOBALS['phpgw_info']['login_template_set'].'/images/logo.png'; + + if($GLOBALS['phpgw_info']['server']['login_logo_file']) + { + $tmpl->set_var('logo_file',$GLOBALS['phpgw']->common->image('phpgwapi',$GLOBALS['phpgw_info']['server']['login_logo_file'])); + } + elseif(getimagesize($template_logo_file)) + { + $tmpl->set_var('logo_file',$template_logo_file); + } + else + { + $tmpl->set_var('logo_file',$GLOBALS['phpgw']->common->image('phpgwapi','logo')); + } + $tmpl->set_var('logo_title',($GLOBALS['phpgw_info']['server']['login_logo_title']?$GLOBALS['phpgw_info']['server']['login_logo_title']:'eGroupWare --> home')); $tmpl->set_var('autocomplete', ($GLOBALS['phpgw_info']['server']['autocomplete_login'] ? 'autocomplete="off"' : ''));