diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php
index 95acc03d03a..ebf3ffe3ebb 100644
--- a/htdocs/lib/functions.lib.php
+++ b/htdocs/lib/functions.lib.php
@@ -1101,9 +1101,18 @@ function img_object($alt, $object)
function img_picto($alt, $picto, $options='', $pictoisfullpath=0)
{
global $conf;
+
+ $path = 'theme/'.$conf->theme;
+
+ if (preg_match('/^([^@]+)@([^@]+)$/i',$picto,$regs))
+ {
+ $picto = $regs[1];
+ $path = $regs[2];
+ }
+
if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto.='.png';
if ($pictoisfullpath) return '
';
- return '
';
+ return '
';
}
/**