Fix: Removed errors

This commit is contained in:
Laurent Destailleur 2009-04-29 21:39:31 +00:00
parent f65f1d3ba7
commit f561be941e

View File

@ -970,10 +970,10 @@ class DolibarrModules
{ {
$name = $this->const_name."_DIR_".strtoupper($this->dirs[$key][0]); $name = $this->const_name."_DIR_".strtoupper($this->dirs[$key][0]);
$dir = $this->dirs[$key][1]; $dir = $this->dirs[$key][1];
$const = $this->dirs[$key][2]; $const = empty($this->dirs[$key][2])?'':$this->dirs[$key][2];
// Define directory full path // Define directory full path
if (empty($conf->entity)) $fulldir = DOL_DATA_ROOT.$dir; if (empty($conf->global->MULTICOMPANY)) $fulldir = DOL_DATA_ROOT.$dir;
else $fulldir = DOL_DATA_ROOT."/".$conf->entity.$dir; else $fulldir = DOL_DATA_ROOT."/".$conf->entity.$dir;
// Create dir if it does not exists // Create dir if it does not exists
if ($fulldir && ! file_exists($fulldir)) if ($fulldir && ! file_exists($fulldir))
@ -986,7 +986,7 @@ class DolibarrModules
} }
} }
// define the constant if requested // define the constant if requested
if (isset($const) && $const) if ($const)
{ {
$result = $this->insert_dirs($name,$dir); $result = $this->insert_dirs($name,$dir);
if ($result) $err++; if ($result) $err++;
@ -997,6 +997,7 @@ class DolibarrModules
return $err; return $err;
} }
/** /**
* \brief Insert directories in llx_const * \brief Insert directories in llx_const
* \return int Number of errors (0 if OK) * \return int Number of errors (0 if OK)
@ -1034,9 +1035,10 @@ class DolibarrModules
return $err; return $err;
} }
/** /**
* \brief Remove directory entries * \brief Remove directory entries
* \return int Nombre d'erreurs (0 si ok) * \return int Number of errors (0 if OK)
*/ */
function delete_dirs() function delete_dirs()
{ {