Can use directory defined in modules (but should not as this can works without)

This commit is contained in:
Laurent Destailleur 2009-04-29 20:17:31 +00:00
parent a7ba3bf3cb
commit bc5b47067d

View File

@ -955,11 +955,13 @@ class DolibarrModules
}
/**
* \brief Insere et cree les répertoires output et temp
* \return int Nombre d'erreurs (0 si ok)
* \brief Create directories required by module
* \return int Number of errors (0 if OK)
*/
function insert_dirs()
{
// TODO Keep only dir creation, no need to insert values in database.
global $langs, $conf;
$err=0;
@ -991,9 +993,10 @@ class DolibarrModules
if ($resql)
{
// On defini l'entite
$dir = DOL_DATA_ROOT."/".$conf->entity.$dir;
// Define directory full path
if (empty($conf->entity)) $dir = DOL_DATA_ROOT.'/'.$dir;
else $dir = DOL_DATA_ROOT."/".$conf->entity.'/'.$dir;
// Create dir if it does not exists
if ($dir && ! file_exists($dir))
{
if (create_exdir($dir) < 0)