From 7360bc1b6f2fb9a86f5b52a80d69d012cebe7fce Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 Jan 2011 16:43:55 +0000 Subject: [PATCH] Fix: Removed warnings --- htdocs/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 54c7b31e3f3..a923a89207e 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -1208,7 +1208,7 @@ function img_object($alt, $object, $options='') $object = $regs[1]; $path = $regs[2]; // If img file not into standard path, we use alternate path - if (DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/object_'.$object.'.png')) $url = DOL_URL_ROOT_ALT; + if (defined('DOL_URL_ROOT_ALT') && DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/object_'.$object.'.png')) $url = DOL_URL_ROOT_ALT; } return ''.dol_escape_htmltag($alt).''; @@ -1237,7 +1237,7 @@ function img_picto($alt, $picto, $options='', $pictoisfullpath=0) $picto = $regs[1]; $path = $regs[2]; // If img file not into standard path, we use alternate path - if (DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/'.$picto)) $url = DOL_URL_ROOT_ALT; + if (defined('DOL_URL_ROOT_ALT') && DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/'.$picto)) $url = DOL_URL_ROOT_ALT; } if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto.='.png';