diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 7adcd79d364..34fc77bbc34 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -205,6 +205,17 @@ class Conf $db->free($resql); } + // Include local constants files and fetch their values to the corresponding database constants + if(! empty($this->global->LOCAL_CONSTS_FILES)) { + $filesList = explode(":", $this->global->LOCAL_CONSTS_FILES); + foreach ($filesList as $file) { + $file=dol_sanitizeFileName($file); + include_once DOL_DOCUMENT_ROOT . "/$file/{$file}_consts.php"; + foreach ($file2bddconsts as $key=>$value) { + $conf->global->$key=constant($value); + } + } + } //var_dump($this->modules); //var_dump($this->modules_parts['theme']);