From 47d1debc49c693e2e4dd3efc2fe9348fd05333da Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Aug 2011 22:01:23 +0000 Subject: [PATCH] Fix: Change to disable new feature. Enabled only on condition because it slows software (because of lot of IO for each picto). --- htdocs/lib/functions.lib.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 7ad52faee6b..2b56ceabceb 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.551 2011/08/04 21:46:50 eldy Exp $ + * \version $Id: functions.lib.php,v 1.552 2011/08/04 22:01:23 eldy Exp $ */ // For compatibility during upgrade @@ -1637,10 +1637,9 @@ 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).''; + if (! empty($conf->global->MAIN_MODULE_CAN_OVERWRITE_COMMONICONS) && file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/'.$picto)) return ''.dol_escape_htmltag($alt).''; return ''.dol_escape_htmltag($alt).''; }