From 2017815e89228aac223bcc8341ddd9f2b0d2bac9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 20 Feb 2013 17:34:03 +0100 Subject: [PATCH] Fix: Works for both normalized modules and external modules --- htdocs/core/class/html.formfile.class.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 97ae273bcc9..16db9b693a5 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -349,12 +349,18 @@ class FormFile } else { - // Generic feature, for external modules - $file=dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php',0); + // For normalized standard modules + $file=dol_buildpath('/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php',0); if (file_exists($file)) { $res=include_once $file; } + // For normalized external modules + else + { + $file=dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php',0); + $res=include_once $file; + } $class='Modele'.ucfirst($modulepart); if (class_exists($class)) {