2
0
forked from Wavyzz/dolibarr

Fix: remove test in $pictoisfullpath and add test in $options

This commit is contained in:
Regis Houssin
2012-08-04 14:18:02 +02:00
parent 46511de913
commit 4d3e798f99

View File

@@ -1636,7 +1636,7 @@ function img_picto($alt, $picto, $options = '', $pictoisfullpath = false)
global $conf;
// Define fullpathpicto to use into src
if (! empty($pictoisfullpath)) {
if ($pictoisfullpath) {
// Clean parameters
if (! preg_match('/(\.png|\.gif)$/i',$picto))
$picto .= '.png';
@@ -1665,7 +1665,7 @@ function img_picto($alt, $picto, $options = '', $pictoisfullpath = false)
$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:'').'>';
}
/**