Can use directory defined in modules (but should not as this can works without)
This commit is contained in:
parent
a7ba3bf3cb
commit
bc5b47067d
@ -955,11 +955,13 @@ class DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Insere et cree les répertoires output et temp
|
* \brief Create directories required by module
|
||||||
* \return int Nombre d'erreurs (0 si ok)
|
* \return int Number of errors (0 if OK)
|
||||||
*/
|
*/
|
||||||
function insert_dirs()
|
function insert_dirs()
|
||||||
{
|
{
|
||||||
|
// TODO Keep only dir creation, no need to insert values in database.
|
||||||
|
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
|
|
||||||
$err=0;
|
$err=0;
|
||||||
@ -991,9 +993,10 @@ class DolibarrModules
|
|||||||
|
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
// On defini l'entite
|
// Define directory full path
|
||||||
$dir = DOL_DATA_ROOT."/".$conf->entity.$dir;
|
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 ($dir && ! file_exists($dir))
|
||||||
{
|
{
|
||||||
if (create_exdir($dir) < 0)
|
if (create_exdir($dir) < 0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user