diff --git a/htdocs/compta/prelevement/bon-prelevement.class.php b/htdocs/compta/prelevement/bon-prelevement.class.php index 2a6858edc4a..55c3cb7ea02 100644 --- a/htdocs/compta/prelevement/bon-prelevement.class.php +++ b/htdocs/compta/prelevement/bon-prelevement.class.php @@ -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); diff --git a/htdocs/compta/prelevement/fiche.php b/htdocs/compta/prelevement/fiche.php index 0f877525df7..1e670001863 100644 --- a/htdocs/compta/prelevement/fiche.php +++ b/htdocs/compta/prelevement/fiche.php @@ -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) { diff --git a/htdocs/core/conf.class.php b/htdocs/core/conf.class.php index 36b61abdc98..e9907bea221 100644 --- a/htdocs/core/conf.class.php +++ b/htdocs/core/conf.class.php @@ -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:''; diff --git a/htdocs/includes/modules/modPrelevement.class.php b/htdocs/includes/modules/modPrelevement.class.php index 33789eab7eb..03d2f24693a 100644 --- a/htdocs/includes/modules/modPrelevement.class.php +++ b/htdocs/includes/modules/modPrelevement.class.php @@ -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 diff --git a/htdocs/includes/modules/modTax.class.php b/htdocs/includes/modules/modTax.class.php index 7667fff8ce9..93ec37966a1 100644 --- a/htdocs/includes/modules/modTax.class.php +++ b/htdocs/includes/modules/modTax.class.php @@ -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(); diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 4e47faa0da0..ac6b18deab5 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -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