mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-16 06:21:28 +01:00
Fix pb with .svg
This commit is contained in:
@@ -1135,7 +1135,7 @@ function dol_get_fiche_end($notab=0)
|
|||||||
* @param string $paramid Name of parameter to use to name the id into the URL next/previous link
|
* @param string $paramid Name of parameter to use to name the id into the URL next/previous link
|
||||||
* @param string $morehtml More html content to output just before the nav bar
|
* @param string $morehtml More html content to output just before the nav bar
|
||||||
* @param int $shownav Show Condition (navigation is shown if value is 1)
|
* @param int $shownav Show Condition (navigation is shown if value is 1)
|
||||||
* @param string $fieldid Nom du champ en base a utiliser pour select next et previous (we make the select max and min on this field)
|
* @param string $fieldid Nom du champ en base a utiliser pour select next et previous (we make the select max and min on this field). Use 'none' for no prev/next search.
|
||||||
* @param string $fieldref Nom du champ objet ref (object->ref) a utiliser pour select next et previous
|
* @param string $fieldref Nom du champ objet ref (object->ref) a utiliser pour select next et previous
|
||||||
* @param string $morehtmlref More html to show after ref
|
* @param string $morehtmlref More html to show after ref
|
||||||
* @param string $moreparam More param to add in nav link url.
|
* @param string $moreparam More param to add in nav link url.
|
||||||
@@ -1286,7 +1286,8 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|||||||
if ($object->element == 'project' && ! $object->public) $picto = 'project'; // instead of projectpub
|
if ($object->element == 'project' && ! $object->public) $picto = 'project'; // instead of projectpub
|
||||||
$nophoto=img_picto('', 'object_'.$picto, '', false, 1);
|
$nophoto=img_picto('', 'object_'.$picto, '', false, 1);
|
||||||
}
|
}
|
||||||
$morehtmlleft.='<!-- No photo to show --><div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').' src="'.$nophoto.'"></div></div>';
|
$morehtmlleft.='<!-- No photo to show -->';
|
||||||
|
$morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$modulepart.($cssclass?' '.$cssclass:'').'" alt="No photo" border="0"'.($width?' width="'.$width.'"':'').' src="'.$nophoto.'"></div></div>';
|
||||||
$morehtmlleft.='</div>';
|
$morehtmlleft.='</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2553,7 +2554,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $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
|
||||||
@@ -2575,7 +2576,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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", ...)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user