mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-23 09:51:33 +01:00
Fix: remove test in $pictoisfullpath and add test in $options
This commit is contained in:
@@ -1636,7 +1636,7 @@ function img_picto($alt, $picto, $options = '', $pictoisfullpath = false)
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Define fullpathpicto to use into src
|
// Define fullpathpicto to use into src
|
||||||
if (! empty($pictoisfullpath)) {
|
if ($pictoisfullpath) {
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
if (! preg_match('/(\.png|\.gif)$/i',$picto))
|
if (! preg_match('/(\.png|\.gif)$/i',$picto))
|
||||||
$picto .= '.png';
|
$picto .= '.png';
|
||||||
@@ -1665,7 +1665,7 @@ function img_picto($alt, $picto, $options = '', $pictoisfullpath = false)
|
|||||||
$fullpathpicto = $url.'/'.$path.'/img/'.$picto;
|
$fullpathpicto = $url.'/'.$path.'/img/'.$picto;
|
||||||
}
|
}
|
||||||
|
|
||||||
return '<img src="'.$fullpathpicto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
|
return '<img src="'.$fullpathpicto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.(! empty($options)?' '.$options:'').'>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user