From e794a3b321d764fa007ea56532a3412730707dfb Mon Sep 17 00:00:00 2001 From: dolibarr95 <24292300+dolibarr95@users.noreply.github.com> Date: Tue, 2 Jan 2018 11:44:54 +0100 Subject: [PATCH] Update functions.lib.php add more parameters and add if empty --- htdocs/core/lib/functions.lib.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 06574be96a5..0fa71c97c49 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2264,11 +2264,12 @@ function dol_print_phone($phone,$countrycode='',$cid=0,$socid=0,$addlink='',$sep $rep=''; if ($hookmanager) { - $parameters = array('countrycode' => $countrycode, 'cid' => $cid, 'socid' => $socid); + $parameters = array('countrycode' => $countrycode, 'cid' => $cid, 'socid' => $socid,'titlealt' => $titlealt, 'picto' => $picto); $reshook = $hookmanager->executeHooks('printPhone', $parameters, $phone); $rep.=$hookmanager->resPrint; } - + if (empty($reshook)) + { $picto = ''; if($withpicto){ if($withpicto=='fax'){ @@ -2286,7 +2287,7 @@ function dol_print_phone($phone,$countrycode='',$cid=0,$socid=0,$addlink='',$sep $rep.=($withpicto?img_picto($titlealt, 'object_'.$picto.'.png').' ':'').$newphone; if ($adddivfloat) $rep.=''; else $rep.=''; - + } return $rep; }