From 70cd68ebefb00a208cf961f1a02cc84a4b8f4294 Mon Sep 17 00:00:00 2001 From: De Coninck Laurent Date: Thu, 25 Oct 2018 18:21:00 +0200 Subject: [PATCH] improve img_picto by returning ASAP We do not need an else each time some times, return is good enough. I also remove some line of comments since it's only code in it. We have GIT to find the code back we do not need to put it in comment ;-). --- htdocs/core/lib/functions.lib.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 7888338cdc2..cf464f69344 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3297,15 +3297,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ if ($srconly) { return $fullpathpicto; } - else { // tag title is used for tooltip on , tag alt can be used with very simple text on image for bind people - //$tmparray=array(0=>$titlealt); - //if (empty($notitle) && preg_match('/:[^\s0-9]/',$titlealt)) $tmparray=explode(':',$titlealt); // We explode if we have TextA:TextB. Not if we have TextA: TextB - //$title=$tmparray[0]; - //$alt=empty($tmparray[1])?'':$tmparray[1]; - $title = $titlealt; - return ''.dol_escape_htmltag($alt).''; // Alt is used for accessibility, title for popup - } + return ''.dol_escape_htmltag($alt).''; // Alt is used for accessibility, title for popup } /**