Update functions.lib.php

add more parameters and add if empty
This commit is contained in:
dolibarr95 2018-01-02 11:44:54 +01:00 committed by GitHub
parent ab896dc49d
commit e794a3b321
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.='</div>';
else $rep.='</span>';
}
return $rep;
}