mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Fixed loading of external numeration modules in Contrat, Commande, Facture, Contrat, Expedition, Fichinter, CommandeFournisseur and uniformized code
This commit is contained in:
@@ -137,17 +137,20 @@ class Commande extends CommonOrder
|
||||
$classname = $conf->global->COMMANDE_ADDON;
|
||||
|
||||
// Include file with class
|
||||
foreach ($conf->file->dol_document_root as $dirroot)
|
||||
{
|
||||
$dir = $dirroot."/core/modules/commande/";
|
||||
// Load file with numbering class (if found)
|
||||
$mybool|=@include_once $dir.$file;
|
||||
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||
|
||||
foreach ($dirmodels as $reldir) {
|
||||
|
||||
$dir = dol_buildpath($reldir."core/modules/commande/");
|
||||
|
||||
// Load file with numbering class (if found)
|
||||
$mybool|=@include_once $dir.$file;
|
||||
}
|
||||
|
||||
if (! $mybool)
|
||||
{
|
||||
dol_print_error('',"Failed to include file ".$file);
|
||||
return '';
|
||||
dol_print_error('',"Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
$obj = new $classname();
|
||||
|
||||
Reference in New Issue
Block a user