diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php
index 8a4f1980419..cafc35e975d 100644
--- a/htdocs/commande/stats/index.php
+++ b/htdocs/commande/stats/index.php
@@ -62,7 +62,7 @@ if ($mode == 'customer')
if ($mode == 'supplier')
{
$title=$langs->trans("OrdersStatisticsSuppliers");
- $dir=$conf->fournisseur->dir_commande_temp;
+ $dir=$conf->fournisseur->commande->dir_temp;
}
print_fiche_titre($title, $mesg);
diff --git a/htdocs/commande/stats/month.php b/htdocs/commande/stats/month.php
index 5626080efcd..023b1b9ce8f 100644
--- a/htdocs/commande/stats/month.php
+++ b/htdocs/commande/stats/month.php
@@ -60,7 +60,7 @@ if ($mode == 'customer')
if ($mode == 'supplier')
{
$title=$langs->trans("OrdersStatisticsSuppliers");
- $dir=$conf->fournisseur->dir_commande_temp;
+ $dir=$conf->fournisseur->dir_temp;
}
$mesg = ''.img_previous().' ';
diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php
index 07ad7f96505..7b3e4926ca5 100644
--- a/htdocs/compta/facture/stats/index.php
+++ b/htdocs/compta/facture/stats/index.php
@@ -59,7 +59,7 @@ if ($mode == 'customer')
if ($mode == 'supplier')
{
$title=$langs->trans("BillsStatisticsSuppliers");
- $dir=$conf->fournisseur->dir_facture_temp;
+ $dir=$conf->fournisseur->facture->dir_temp;
}
print_fiche_titre($title, $mesg);
diff --git a/htdocs/compta/facture/stats/month.php b/htdocs/compta/facture/stats/month.php
index 5d2b96d1113..822d697a163 100644
--- a/htdocs/compta/facture/stats/month.php
+++ b/htdocs/compta/facture/stats/month.php
@@ -58,7 +58,7 @@ if ($mode == 'customer')
if ($mode == 'supplier')
{
$title=$langs->trans("BillsStatisticsSuppliers");
- $dir=$conf->fournisseur->dir_facture_temp;
+ $dir=$conf->fournisseur->facture->dir_temp;
}
$mesg = ''.img_previous().' ';
diff --git a/htdocs/core/conf.class.php b/htdocs/core/conf.class.php
index 90d10e5442d..afff50c3237 100644
--- a/htdocs/core/conf.class.php
+++ b/htdocs/core/conf.class.php
@@ -115,11 +115,13 @@ class Conf
$dir_name = "dir_".strtolower($reg[2]);
$submodule = strtolower($reg[1]);
$this->$module->$submodule->$dir_name = $value;
+ //print '->'.$module.'->'.$submodule.'->'.$dir_name.' = '.$this->$module->$submodule->$dir_name.'
';
}
else if (eregi('_DIR_([A-Z]+)$',$key,$reg))
{
$dir_name = "dir_".strtolower($reg[1]);
$this->$module->$dir_name = $value; // We put only dir name. We will add DOL_DATA_ROOT later
+ //print '->'.$module.'->'.$dir_name.' = '.$this->$module->$dir_name.'
';
}
}
// If this is a module constant
diff --git a/htdocs/includes/modules/DolibarrModules.class.php b/htdocs/includes/modules/DolibarrModules.class.php
index abcb47f8851..09c7998cd93 100644
--- a/htdocs/includes/modules/DolibarrModules.class.php
+++ b/htdocs/includes/modules/DolibarrModules.class.php
@@ -974,12 +974,11 @@ class DolibarrModules
$subname = empty($this->dirs[$key][3])?'':strtoupper($this->dirs[$key][3]); // Add submodule name (ex: $conf->module->submodule->dir_output)
$forcename = empty($this->dirs[$key][4])?'':strtoupper($this->dirs[$key][4]); // Change the module name if different
- if ($forcename) $constname = $forcename."_DIR_";
+ if ($forcename) $constname = 'MAIN_MODULE_'.$forcename."_DIR_";
if ($subname) $constname = $constname.$subname."_";
$name = $constname.strtoupper($this->dirs[$key][0]);
-
// Define directory full path
if (empty($conf->global->MAIN_MODULE_MULTICOMPANY)) $fulldir = DOL_DATA_ROOT.$dir;
else $fulldir = DOL_DATA_ROOT."/".$conf->entity.$dir;
diff --git a/htdocs/includes/modules/modExpedition.class.php b/htdocs/includes/modules/modExpedition.class.php
index 05b42e59b39..8ab685ea0f6 100644
--- a/htdocs/includes/modules/modExpedition.class.php
+++ b/htdocs/includes/modules/modExpedition.class.php
@@ -69,17 +69,29 @@ class modExpedition extends DolibarrModules
$this->dirs[$r][0] = "temp";
$this->dirs[$r][1] = "/expedition/temp";
$r++;
- $this->dirs[$r][0] = "bon_expedition";
+ $this->dirs[$r][0] = "output";
$this->dirs[$r][1] = "/expedition/sending";
+ $this->dirs[$r][2] = 1;
+ $this->dirs[$r][3] = '';
+ $this->dirs[$r][4] = "expedition_bon";
$r++;
- $this->dirs[$r][0] = "bon_expedition_temp";
+ $this->dirs[$r][0] = "temp";
$this->dirs[$r][1] = "/expedition/sending/temp";
+ $this->dirs[$r][2] = 1;
+ $this->dirs[$r][3] = '';
+ $this->dirs[$r][4] = "expedition_bon";
$r++;
- $this->dirs[$r][0] = "bon_livraison";
+ $this->dirs[$r][0] = "output";
$this->dirs[$r][1] = "/expedition/receipt";
+ $this->dirs[$r][2] = 1;
+ $this->dirs[$r][3] = '';
+ $this->dirs[$r][4] = "livraison_bon";
$r++;
- $this->dirs[$r][0] = "bon_livraison_temp";
+ $this->dirs[$r][0] = "temp";
$this->dirs[$r][1] = "/expedition/receipt/temp";
+ $this->dirs[$r][2] = 1;
+ $this->dirs[$r][3] = '';
+ $this->dirs[$r][4] = "livraison_bon";
// Config pages
$this->config_page_url = array("confexped.php");
@@ -182,9 +194,6 @@ class modExpedition extends DolibarrModules
// Permissions
$this->remove();
- // Dir
- $this->dirs[0] = DOL_DATA_ROOT."/expedition";
-
$sql = array();
return $this->_init($sql);
diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php
index 3883389bf3e..1bf60fcce24 100644
--- a/htdocs/viewimage.php
+++ b/htdocs/viewimage.php
@@ -163,7 +163,7 @@ if ($modulepart)
{
$accessallowed=1;
}
- $original_file=$conf->fournisseur->dir_commande_temp.'/'.$original_file;
+ $original_file=$conf->fournisseur->commande->dir_temp.'/'.$original_file;
}
// Wrapping pour les images des stats factures
@@ -183,7 +183,7 @@ if ($modulepart)
{
$accessallowed=1;
}
- $original_file=$conf->fournisseur->dir_facture_temp.'/'.$original_file;
+ $original_file=$conf->fournisseur->facture->dir_temp.'/'.$original_file;
}
// Wrapping pour les images des stats expeditions