forked from Wavyzz/dolibarr
Add: can defined submodule name (ex: $conf->module->submodule->dir_output)
Add: can change the module name if different (ex: $conf->newmodulename->dir_output)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 = '<a href="month.php?year='.($year - 1).'&mode='.$mode.'">'.img_previous().'</a> ';
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 = '<a href="month.php?year='.($year - 1).'&mode='.$mode.'">'.img_previous().'</a> ';
|
||||
|
||||
@@ -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.'<br>';
|
||||
}
|
||||
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.'<br>';
|
||||
}
|
||||
}
|
||||
// If this is a module constant
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user