From e644de4a705c4b62e86eab5fa17735ce8d684f56 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Feb 2019 15:30:21 +0100 Subject: [PATCH] Fix for font awesome 5 --- htdocs/core/lib/functions.lib.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 039d052692a..1be84ddcd4f 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2979,7 +2979,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'jabber','skype','twitter','facebook' ) )) { - $fakey = $pictowithoutext; + $fa='fa'; + if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fa='fas'; + $fakey = $pictowithoutext; $facolor = ''; $fasize = ''; $marginleftonlyshort = 2; if ($pictowithoutext == 'switch_off') { @@ -3074,6 +3076,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ elseif ($pictowithoutext == 'jabber') { $fakey = 'fa-comment-o'; } + elseif ($pictowithoutext == 'skype') { + $fakey = 'fa-'.$pictowithoutext; + if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fa = 'fab'; + } elseif ($pictowithoutext == 'split') { $fakey = 'fa-code-fork'; } @@ -3095,8 +3101,6 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ } $moreatt=trim($moreatt); - $fa='fa'; - if (! empty($conf->global->MAIN_USE_FONT_AWESOME_5)) $fa='fas'; $enabledisablehtml = ''; if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {