mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Fix: Removed warnings
This commit is contained in:
@@ -1208,7 +1208,7 @@ function img_object($alt, $object, $options='')
|
|||||||
$object = $regs[1];
|
$object = $regs[1];
|
||||||
$path = $regs[2];
|
$path = $regs[2];
|
||||||
// If img file not into standard path, we use alternate path
|
// If img file not into standard path, we use alternate path
|
||||||
if (DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/object_'.$object.'.png')) $url = DOL_URL_ROOT_ALT;
|
if (defined('DOL_URL_ROOT_ALT') && DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/object_'.$object.'.png')) $url = DOL_URL_ROOT_ALT;
|
||||||
}
|
}
|
||||||
|
|
||||||
return '<img src="'.$url.'/'.$path.'/img/object_'.$object.'.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
|
return '<img src="'.$url.'/'.$path.'/img/object_'.$object.'.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
|
||||||
@@ -1237,7 +1237,7 @@ function img_picto($alt, $picto, $options='', $pictoisfullpath=0)
|
|||||||
$picto = $regs[1];
|
$picto = $regs[1];
|
||||||
$path = $regs[2];
|
$path = $regs[2];
|
||||||
// If img file not into standard path, we use alternate path
|
// If img file not into standard path, we use alternate path
|
||||||
if (DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/'.$picto)) $url = DOL_URL_ROOT_ALT;
|
if (defined('DOL_URL_ROOT_ALT') && DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/'.$picto)) $url = DOL_URL_ROOT_ALT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto.='.png';
|
if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto.='.png';
|
||||||
|
|||||||
Reference in New Issue
Block a user