New: parametre de config des repertoires dans les proprietes de la classe du module
avec un rpertoire parent en fonction de l'entit
This commit is contained in:
parent
119604703a
commit
e423d4193c
@ -830,7 +830,7 @@ class BonPrelevement extends CommonObject
|
||||
{
|
||||
$prev_id = $this->db->last_insert_id(MAIN_DB_PREFIX."prelevement_bons");
|
||||
|
||||
$dir=$conf->prelevement->dir_output.'/bon';
|
||||
$dir=$conf->prelevement->dir_bon;
|
||||
$file=$filebonprev;
|
||||
if (! is_dir($dir)) create_exdir($dir);
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ if ($_POST["action"] == 'infotrans')
|
||||
|
||||
if ($_FILES['userfile']['name'] && basename($_FILES['userfile']['name'],".ps") == $bon->ref)
|
||||
{
|
||||
$dir = $conf->prelevement->dir_output.'/bon/';
|
||||
$dir = $conf->prelevement->dir_bon;
|
||||
|
||||
if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $dir . "/" . $_FILES['userfile']['name'],1) > 0)
|
||||
{
|
||||
|
||||
@ -160,10 +160,6 @@ class Conf
|
||||
|
||||
// Module societe
|
||||
if (defined('SOCIETE_OUTPUTDIR') && SOCIETE_OUTPUTDIR) { $this->societe->dir_output=SOCIETE_OUTPUTDIR; } # Pour passer outre le rep par defaut
|
||||
|
||||
// Module taxes et charges sociales
|
||||
$this->tax->dir_output=DOL_DATA_ROOT."/taxes";
|
||||
$this->tax->dir_temp =DOL_DATA_ROOT."/taxes/temp";
|
||||
|
||||
// Module ficheinter
|
||||
if (defined('FICHEINTER_OUTPUTDIR') && FICHEINTER_OUTPUTDIR) { $this->ficheinter->dir_output=FICHEINTER_OUTPUTDIR; } # Pour passer outre le rep par defaut
|
||||
@ -175,10 +171,7 @@ class Conf
|
||||
$this->droitpret->cat=defined('DROITPRET_CAT')?DROITPRET_CAT:'';
|
||||
$this->droitpret->cat=defined('DROITPRET_MAIL')?DROITPRET_MAIL:'';
|
||||
$this->droitpret->dir_temp=DOL_DATA_ROOT."/droitpret/temp";
|
||||
|
||||
// Module prelevement
|
||||
$this->prelevement->dir_output=DOL_DATA_ROOT."/prelevement";
|
||||
$this->prelevement->dir_temp =DOL_DATA_ROOT."/prelevement/temp";
|
||||
|
||||
// Module webcal
|
||||
$this->webcal->db->type=defined('PHPWEBCALENDAR_TYPE')?PHPWEBCALENDAR_TYPE:'__dolibarr_main_db_type__';
|
||||
$this->webcal->db->host=defined('PHPWEBCALENDAR_HOST')?PHPWEBCALENDAR_HOST:'';
|
||||
|
||||
@ -62,8 +62,22 @@ class modPrelevement extends DolibarrModules
|
||||
$this->special = 0;
|
||||
// Name of png file (without png) used for this module
|
||||
$this->picto='payment';
|
||||
// Dir
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/prelevement";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/prelevement/temp";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "bon";
|
||||
$this->dirs[$r][1] = "/prelevement/bon";
|
||||
|
||||
$this->dirs[0] = $conf->prelevement->dir_output . "/bon";
|
||||
|
||||
// Dependancies
|
||||
|
||||
@ -63,12 +63,23 @@ class modTax extends DolibarrModules
|
||||
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
$this->special = 0;
|
||||
$this->picto='bill';
|
||||
$this->picto='bill';
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
$r=0;
|
||||
|
||||
$this->dirs[$r][0] = "output";
|
||||
$this->dirs[$r][1] = "/taxes";
|
||||
|
||||
$r++;
|
||||
$this->dirs[$r][0] = "temp";
|
||||
$this->dirs[$r][1] = "/taxes/temp";
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("taxes.php");
|
||||
|
||||
// D<>pendances
|
||||
// Dependances
|
||||
$this->depends = array();
|
||||
$this->requiredby = array();
|
||||
$this->conflictwith = array();
|
||||
@ -77,11 +88,6 @@ class modTax extends DolibarrModules
|
||||
// Constantes
|
||||
$this->const = array();
|
||||
|
||||
// Repertoires
|
||||
$this->dirs = array();
|
||||
$this->dirs[0] = $conf->tax->dir_output;
|
||||
$this->dirs[1] = $conf->tax->dir_temp;
|
||||
|
||||
// Boites
|
||||
$this->boxes = array();
|
||||
|
||||
|
||||
@ -225,7 +225,7 @@ if ($modulepart)
|
||||
$user->getrights('prelevement');
|
||||
if ($user->rights->prelevement->bons->lire) $accessallowed=1;
|
||||
|
||||
$original_file=$conf->prelevement->dir_output.'/bon/'.$original_file;
|
||||
$original_file=$conf->prelevement->dir_bon.'/'.$original_file;
|
||||
}
|
||||
|
||||
// Wrapping pour les graph telephonie
|
||||
|
||||
Loading…
Reference in New Issue
Block a user