Fix: Works for both normalized modules and external modules
This commit is contained in:
parent
1aee361ffd
commit
2017815e89
@ -349,12 +349,18 @@ class FormFile
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Generic feature, for external modules
|
// For normalized standard modules
|
||||||
$file=dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php',0);
|
$file=dol_buildpath('/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php',0);
|
||||||
if (file_exists($file))
|
if (file_exists($file))
|
||||||
{
|
{
|
||||||
$res=include_once $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);
|
$class='Modele'.ucfirst($modulepart);
|
||||||
if (class_exists($class))
|
if (class_exists($class))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user