php warning when  MAIN_MODULE_xxxxx_DIR exists but the module does not have a directory.
This commit is contained in:
dolibarr95 2017-09-25 09:01:47 +02:00 committed by GitHub
parent e3da4188e2
commit 6ee15f1c45

View File

@ -287,15 +287,18 @@ class Conf
{ {
foreach($this->modules_parts['dir'] as $module => $dirs) foreach($this->modules_parts['dir'] as $module => $dirs)
{ {
foreach($dirs as $type => $name) if (! empty($this->$module->enabled))
{ {
$subdir=($type=='temp'?'/temp':''); foreach($dirs as $type => $name)
// For multicompany sharings {
$varname = 'multidir_'.$type; $subdir=($type=='temp'?'/temp':'');
$this->$module->$varname = array($this->entity => $rootfordata."/".$name.$subdir); // For multicompany sharings
// For backward compatibility $varname = 'multidir_'.$type;
$varname = 'dir_'.$type; $this->$module->$varname = array($this->entity => $rootfordata."/".$name.$subdir);
$this->$module->$varname = $rootfordata."/".$name.$subdir; // For backward compatibility
$varname = 'dir_'.$type;
$this->$module->$varname = $rootfordata."/".$name.$subdir;
}
} }
} }
} }