From 2caf09b1dc2ded7e121a73bb41aa1f945ab12da4 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 4 Aug 2011 07:50:25 +0000 Subject: [PATCH] Fix: possibility to personnalized common picto in current theme --- htdocs/lib/functions.lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 2209b8777e3..fa07d64073b 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -28,7 +28,7 @@ * \file htdocs/lib/functions.lib.php * \brief A set of functions for Dolibarr * This file contains all frequently used functions. - * \version $Id: functions.lib.php,v 1.549 2011/07/31 23:25:25 eldy Exp $ + * \version $Id: functions.lib.php,v 1.550 2011/08/04 07:50:25 hregis Exp $ */ // For compatibility during upgrade @@ -1637,8 +1637,10 @@ function img_picto($alt, $picto, $options='', $pictoisfullpath=0) function img_picto_common($alt, $picto, $options='', $pictoisfullpath=0) { global $conf; + $path = 'theme/'.$conf->theme; if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto.='.png'; if ($pictoisfullpath) return ''.dol_escape_htmltag($alt).''; + if (file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/'.$picto)) return ''.dol_escape_htmltag($alt).''; return ''.dol_escape_htmltag($alt).''; }