Fix pb with .svg files
This commit is contained in:
parent
8b793a261f
commit
ab72fbffc6
@ -2325,7 +2325,7 @@ function img_picto($titlealt, $picto, $morealt = '', $pictoisfullpath = false, $
|
|||||||
if ($pictoisfullpath)
|
if ($pictoisfullpath)
|
||||||
{
|
{
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto .= '.png';
|
if (! preg_match('/(\.png|\.gif|\.svg)$/i',$picto)) $picto .= '.png';
|
||||||
$fullpathpicto = $picto;
|
$fullpathpicto = $picto;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2346,7 +2346,7 @@ function img_picto($titlealt, $picto, $morealt = '', $pictoisfullpath = false, $
|
|||||||
$path = $regs[2]; // $path is $mymodule
|
$path = $regs[2]; // $path is $mymodule
|
||||||
}
|
}
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto .= '.png';
|
if (! preg_match('/(\.png|\.gif|\.svg)$/i',$picto)) $picto .= '.png';
|
||||||
// If alt path are defined, define url where img file is, according to physical path
|
// If alt path are defined, define url where img file is, according to physical path
|
||||||
foreach ($conf->file->dol_document_root as $type => $dirroot) // ex: array(["main"]=>"/home/maindir/htdocs", ["alt0"]=>"/home/moddir0/htdocs", ...)
|
foreach ($conf->file->dol_document_root as $type => $dirroot) // ex: array(["main"]=>"/home/maindir/htdocs", ["alt0"]=>"/home/moddir0/htdocs", ...)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user