From fdb3202b6b13fa5f77c81eeff0e02a1bb1ff30c2 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 23 Oct 2017 13:23:26 +0200 Subject: [PATCH] Add new config to the admin site configuration in order to be able to upload a custom header logo --- admin/templates/default/config.xet | 7 +++++++ api/src/Framework.php | 11 +++++++++-- pixelegg/head.tpl | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/admin/templates/default/config.xet b/admin/templates/default/config.xet index a84306df98..e84b0691ac 100644 --- a/admin/templates/default/config.xet +++ b/admin/templates/default/config.xet @@ -57,6 +57,13 @@ + + + + + + + diff --git a/api/src/Framework.php b/api/src/Framework.php index 8f99e68c1d..c0b8c0b0e7 100644 --- a/api/src/Framework.php +++ b/api/src/Framework.php @@ -525,12 +525,19 @@ abstract class Framework extends Framework\Extra if (substr($GLOBALS['egw_info']['server']['login_logo_file'],0,4) == 'http' || $GLOBALS['egw_info']['server']['login_logo_file'][0] == '/') { - $var['logo_file'] = $GLOBALS['egw_info']['server']['login_logo_file']; + $var['logo_header'] = $var['logo_file'] = $GLOBALS['egw_info']['server']['login_logo_file']; } else { - $var['logo_file'] = Image::find('phpgwapi',$GLOBALS['egw_info']['server']['login_logo_file']?$GLOBALS['egw_info']['server']['login_logo_file']:'logo', '', null); // null=explicit allow svg + $var['logo_header'] = $var['logo_file'] = Image::find('phpgwapi',$GLOBALS['egw_info']['server']['login_logo_file']?$GLOBALS['egw_info']['server']['login_logo_file']:'logo', '', null); // null=explicit allow svg } + + if (substr($GLOBALS['egw_info']['server']['login_logo_header'],0,4) == 'http' || + $GLOBALS['egw_info']['server']['login_logo_header'][0] == '/') + { + $var['logo_header'] = $GLOBALS['egw_info']['server']['login_logo_header']; + } + $var['logo_url'] = $GLOBALS['egw_info']['server']['login_logo_url']?$GLOBALS['egw_info']['server']['login_logo_url']:'http://www.eGroupWare.org'; if (substr($var['logo_url'],0,4) != 'http') diff --git a/pixelegg/head.tpl b/pixelegg/head.tpl index e1c7c67aa9..d2fe9127bb 100644 --- a/pixelegg/head.tpl +++ b/pixelegg/head.tpl @@ -27,7 +27,7 @@ {hook_after_navbar}
- +