diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php
index cafc35e975d..8a4f1980419 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->commande->dir_temp;
+ $dir=$conf->fournisseur->dir_commande_temp;
}
print_fiche_titre($title, $mesg);
diff --git a/htdocs/commande/stats/month.php b/htdocs/commande/stats/month.php
index 58aa6374894..5626080efcd 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->commande->dir_temp;
+ $dir=$conf->fournisseur->dir_commande_temp;
}
$mesg = ''.img_previous().' ';
diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php
index 7b3e4926ca5..07ad7f96505 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->facture->dir_temp;
+ $dir=$conf->fournisseur->dir_facture_temp;
}
print_fiche_titre($title, $mesg);
diff --git a/htdocs/compta/facture/stats/month.php b/htdocs/compta/facture/stats/month.php
index 822d697a163..5d2b96d1113 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->facture->dir_temp;
+ $dir=$conf->fournisseur->dir_facture_temp;
}
$mesg = ''.img_previous().' ';
diff --git a/htdocs/core/conf.class.php b/htdocs/core/conf.class.php
index 761b000b770..fdf4b0a5b21 100644
--- a/htdocs/core/conf.class.php
+++ b/htdocs/core/conf.class.php
@@ -174,22 +174,13 @@ class Conf
$this->tax->dir_output=DOL_DATA_ROOT."/taxes";
$this->tax->dir_temp =DOL_DATA_ROOT."/taxes/temp";
- // Module don
- $this->don->dir_output=DOL_DATA_ROOT."/dons";
- $this->don->dir_temp =DOL_DATA_ROOT."/dons/temp";
- // Module fournisseur
- $this->fournisseur->dir_output=DOL_DATA_ROOT."/fournisseur";
- $this->fournisseur->dir_temp=DOL_DATA_ROOT."/fournisseur/temp";
- $this->fournisseur->commande->dir_output=DOL_DATA_ROOT."/fournisseur/commande";
- $this->fournisseur->commande->dir_temp =DOL_DATA_ROOT."/fournisseur/commande/temp";
- $this->fournisseur->facture->dir_output =DOL_DATA_ROOT."/fournisseur/facture";
- $this->fournisseur->facture->dir_temp =DOL_DATA_ROOT."/fournisseur/facture/temp";
// Module ficheinter
$this->fichinter->dir_output=DOL_DATA_ROOT."/ficheinter";
$this->fichinter->dir_temp =DOL_DATA_ROOT."/ficheinter/temp";
if (defined('FICHEINTER_OUTPUTDIR') && FICHEINTER_OUTPUTDIR) { $this->fichinter->dir_output=FICHEINTER_OUTPUTDIR; } # Pour passer outre le rep par defaut
// Module produit
$this->produit->MultiPricesEnabled=defined("PRODUIT_MULTIPRICES")?PRODUIT_MULTIPRICES:0;
+
// Module droipret
$this->droitpret->cat=defined('DROITPRET_CAT')?DROITPRET_CAT:'';
$this->droitpret->cat=defined('DROITPRET_MAIL')?DROITPRET_MAIL:'';
@@ -229,9 +220,6 @@ class Conf
if (! defined("PROPALE_NEW_FORM_NB_PRODUCT")) define("PROPALE_NEW_FORM_NB_PRODUCT", 4);
if (defined('PROPALE_OUTPUTDIR') && PROPALE_OUTPUTDIR) { $this->propale->dir_output=PROPALE_OUTPUTDIR; } # Pour passer outre le rep par defaut
- // Module telephonie
- $this->telephonie->dir_output=DOL_DATA_ROOT."/telephonie";
- $this->telephonie->dir_temp =DOL_DATA_ROOT."/telephonie/temp";
// Module domaine
$this->domaine->enabled=0;
// Module voyage
diff --git a/htdocs/document.php b/htdocs/document.php
index ff6ab2181da..5ee21c2a57d 100644
--- a/htdocs/document.php
+++ b/htdocs/document.php
@@ -180,7 +180,7 @@ if ($modulepart)
{
$accessallowed=1;
}
- $original_file=$conf->fournisseur->commande->dir_output.'/'.$original_file;
+ $original_file=$conf->fournisseur->dir_commande.'/'.$original_file;
$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."commande_fournisseur WHERE ref='$refname'";
}
@@ -192,7 +192,7 @@ if ($modulepart)
{
$accessallowed=1;
}
- $original_file=$conf->fournisseur->facture->dir_output.'/'.$original_file;
+ $original_file=$conf->fournisseur->dir_facture.'/'.$original_file;
//$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."facture_fourn WHERE facnumber='$refname'";
}
diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php
index 68516878eee..515b76700eb 100644
--- a/htdocs/fourn/commande/document.php
+++ b/htdocs/fourn/commande/document.php
@@ -76,7 +76,7 @@ if ($commande->fetch($_GET['id'],$_GET['ref']) < 0)
// Envoi fichier
if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
{
- $upload_dir = $conf->fournisseur->commande->dir_output . "/" . sanitizeFileName($commande->ref);
+ $upload_dir = $conf->fournisseur->dir_commande . "/" . sanitizeFileName($commande->ref);
if (! is_dir($upload_dir)) create_exdir($upload_dir);
if (is_dir($upload_dir))
@@ -98,7 +98,7 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
// Delete
if ($action=='delete')
{
- $upload_dir = $conf->fournisseur->commande->dir_output . "/" . sanitizeFileName($commande->ref);
+ $upload_dir = $conf->fournisseur->dir_commande . "/" . sanitizeFileName($commande->ref);
$file = $upload_dir . '/' . urldecode($_GET['urlfile']);
dol_delete_file($file);
$mesg = '
'.$langs->trans("FileWasRemoved").'
';
@@ -117,7 +117,7 @@ if ($id > 0 || ! empty($ref))
{
llxHeader();
- $upload_dir = $conf->fournisseur->commande->dir_output.'/'.sanitizeFileName($commande->ref);
+ $upload_dir = $conf->fournisseur->dir_commande.'/'.sanitizeFileName($commande->ref);
$soc = new Societe($db);
$soc->fetch($commande->socid);
diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php
index 347b4a1ebbd..2122872a3e9 100644
--- a/htdocs/fourn/commande/fiche.php
+++ b/htdocs/fourn/commande/fiche.php
@@ -996,9 +996,9 @@ if ($id > 0 || ! empty($ref))
* Documents generes
*/
$comfournref = sanitizeFileName($commande->ref);
- $file = $conf->fournisseur->commande->dir_output . '/' . $comfournref . '/' . $comfournref . '.pdf';
+ $file = $conf->fournisseur->dir_commande . '/' . $comfournref . '/' . $comfournref . '.pdf';
$relativepath = $comfournref.'/'.$comfournref.'.pdf';
- $filedir = $conf->fournisseur->commande->dir_output . '/' . $comfournref;
+ $filedir = $conf->fournisseur->dir_commande . '/' . $comfournref;
$urlsource=$_SERVER["PHP_SELF"]."?id=".$commande->id;
$genallowed=$user->rights->fournisseur->commande->creer;
$delallowed=$user->rights->fournisseur->commande->supprimer;
diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php
index 6ab8130bac7..1394d338889 100644
--- a/htdocs/fourn/facture/document.php
+++ b/htdocs/fourn/facture/document.php
@@ -69,7 +69,7 @@ if ($_POST['sendit'] && ! empty($conf->global->MAIN_UPLOAD_DOC))
$facture = new FactureFournisseur($db);
if ($facture->fetch($facid))
{
- $upload_dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($facture->id,2).$facture->id;
+ $upload_dir = $conf->fournisseur->dir_facture.'/'.get_exdir($facture->id,2).$facture->id;
if (! is_dir($upload_dir)) create_exdir($upload_dir);
@@ -98,7 +98,7 @@ if ($action=='delete')
$facture = new FactureFournisseur($db);
if ($facture->fetch($facid))
{
- $upload_dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($facture->id,2).$facture->id;
+ $upload_dir = $conf->fournisseur->dir_facture.'/'.get_exdir($facture->id,2).$facture->id;
$file = $upload_dir . '/' . urldecode($_GET['urlfile']);
dol_delete_file($file);
@@ -120,7 +120,7 @@ if ($facid > 0)
{
$facture->fetch_fournisseur();
- $upload_dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($facture->id,2).$facture->id;
+ $upload_dir = $conf->fournisseur->dir_facture.'/'.get_exdir($facture->id,2).$facture->id;
$head = facturefourn_prepare_head($facture);
dol_fiche_head($head, 'documents', $langs->trans('SupplierInvoice'));
diff --git a/htdocs/includes/modules/modAdherent.class.php b/htdocs/includes/modules/modAdherent.class.php
index 83d07c2d21d..116b94f403a 100644
--- a/htdocs/includes/modules/modAdherent.class.php
+++ b/htdocs/includes/modules/modAdherent.class.php
@@ -70,6 +70,10 @@ class modAdherent extends DolibarrModules
$r++;
$this->dirs[$r][0] = "temp";
$this->dirs[$r][1] = "/adherent/temp";
+
+ $r++;
+ $this->dirs[$r][0] = "photos";
+ $this->dirs[$r][1] = "/adherent/photos";
// Config pages
//-------------
@@ -230,12 +234,6 @@ class modAdherent extends DolibarrModules
*/
function init()
{
- global $conf;
-
- // Dir
- $this->dirs[0] = $conf->adherent->dir_output;
- $this->dirs[1] = $conf->adherent->dir_output."/photos";
- $this->dirs[2] = $conf->adherent->dir_export;
$sql = array();
diff --git a/htdocs/includes/modules/modBarcode.class.php b/htdocs/includes/modules/modBarcode.class.php
index af78f47b0f3..4d7d6b40d8d 100644
--- a/htdocs/includes/modules/modBarcode.class.php
+++ b/htdocs/includes/modules/modBarcode.class.php
@@ -1,7 +1,7 @@
* Copyright (C) 2005-2008 Laurent Destailleur
- * Copyright (C) 2005 Regis Houssin
+ * Copyright (C) 2005-2009 Regis Houssin
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/htdocs/includes/modules/modCommande.class.php b/htdocs/includes/modules/modCommande.class.php
index 84bdc268b38..3608100dd1d 100644
--- a/htdocs/includes/modules/modCommande.class.php
+++ b/htdocs/includes/modules/modCommande.class.php
@@ -85,17 +85,20 @@ class modCommande extends DolibarrModules
// Constantes
$this->const = array();
- $this->const[0][0] = "COMMANDE_ADDON_PDF";
- $this->const[0][1] = "chaine";
- $this->const[0][2] = "einstein";
- $this->const[0][3] = 'Nom du gestionnaire de generation des commandes en PDF';
- $this->const[0][4] = 0;
-
- $this->const[1][0] = "COMMANDE_ADDON";
- $this->const[1][1] = "chaine";
- $this->const[1][2] = "mod_commande_marbre";
- $this->const[1][3] = 'Nom du gestionnaire de numerotation des commandes';
- $this->const[1][4] = 0;
+ $r=0;
+
+ $this->const[$r][0] = "COMMANDE_ADDON_PDF";
+ $this->const[$r][1] = "chaine";
+ $this->const[$r][2] = "einstein";
+ $this->const[$r][3] = 'Nom du gestionnaire de generation des commandes en PDF';
+ $this->const[$r][4] = 0;
+
+ $r++;
+ $this->const[$r][0] = "COMMANDE_ADDON";
+ $this->const[$r][1] = "chaine";
+ $this->const[$r][2] = "mod_commande_marbre";
+ $this->const[$r][3] = 'Nom du gestionnaire de numerotation des commandes';
+ $this->const[$r][4] = 0;
// Boites
$this->boxes = array();
diff --git a/htdocs/includes/modules/modDocument.class.php b/htdocs/includes/modules/modDocument.class.php
index 62de281c205..f862bdd6654 100644
--- a/htdocs/includes/modules/modDocument.class.php
+++ b/htdocs/includes/modules/modDocument.class.php
@@ -1,5 +1,6 @@
+/* Copyright (C) 2007 Rodolphe Quiedeville
+ * Copyright (C) 2005-2009 Regis Houssin
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -59,9 +60,16 @@ class modDocument extends DolibarrModules
$this->special = 3;
$this->picto='dir';
- // Dir
+ // Data directories to create when module is enabled
$this->dirs = array();
- $this->dirs[0] = DOL_DATA_ROOT."/ged";
+ $r=0;
+
+ $this->dirs[$r][0] = "output";
+ $this->dirs[$r][1] = "/ged";
+
+ $r++;
+ $this->dirs[$r][0] = "temp";
+ $this->dirs[$r][1] = "/ged/temp";
// Config pages
//$this->config_page_url = array("document.php");
diff --git a/htdocs/includes/modules/modDon.class.php b/htdocs/includes/modules/modDon.class.php
index daf2f2ec4a7..10c9af15399 100644
--- a/htdocs/includes/modules/modDon.class.php
+++ b/htdocs/includes/modules/modDon.class.php
@@ -1,6 +1,7 @@
* Copyright (C) 2004-2007 Laurent Destailleur
+ * Copyright (C) 2005-2009 Regis Houssin
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -57,10 +58,18 @@ class modDon extends DolibarrModules
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->special = 0;
- // Dir
+ // Data directories to create when module is enabled
$this->dirs = array();
+ $r=0;
+
+ $this->dirs[$r][0] = "output";
+ $this->dirs[$r][1] = "/dons";
+
+ $r++;
+ $this->dirs[$r][0] = "temp";
+ $this->dirs[$r][1] = "/dons/temp";
- // D�pendances
+ // Dependances
$this->depends = array();
$this->requiredby = array();
diff --git a/htdocs/includes/modules/modDroitPret.class.php b/htdocs/includes/modules/modDroitPret.class.php
index 52c9445fb3c..1f7e3190a48 100644
--- a/htdocs/includes/modules/modDroitPret.class.php
+++ b/htdocs/includes/modules/modDroitPret.class.php
@@ -1,5 +1,6 @@
+/* Copyright (C) 2007 Patrick Raguin
+ * Copyright (C) 2005-2009 Regis Houssin
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -59,8 +60,10 @@ class modDroitPret extends DolibarrModules
// Dir
global $dolibarr_smarty_compile;
global $dolibarr_smarty_cache;
- $this->dirs = array($dolibarr_smarty_compile,
- $dolibarr_smarty_cache);
+ $this->dirs = array();
+
+ $this->dirs[0] = $dolibarr_smarty_compile;
+ $this->dirs[1] = $dolibarr_smarty_cache;
// Dependances
$this->depends = array();
@@ -74,9 +77,21 @@ class modDroitPret extends DolibarrModules
$this->config_page_url = array("droitpret.php");
// Constantes
- $this->const=array(0=>array('PRODUCT_CANVAS_ABILITY','chaine',1,'This is a constant',1),
- 1=>array('MAIN_NEED_SMARTY','chaine',1,'Need smarty',0)
- );
+ $this->const=array();
+ $r=0;
+
+ $this->const[$r][0] = "PRODUCT_CANVAS_ABILITY";
+ $this->const[$r][1] = "chaine";
+ $this->const[$r][2] = 1;
+ $this->const[$r][3] = 'This is a constant';
+ $this->const[$r][4] = 1;
+
+ $r++;
+ $this->const[$r][0] = "MAIN_NEED_SMARTY";
+ $this->const[$r][1] = "chaine";
+ $this->const[$r][2] = 1;
+ $this->const[$r][3] = 'Need smarty';
+ $this->const[$r][4] = 0;
// Boxes
$this->boxes = array();
@@ -84,18 +99,20 @@ class modDroitPret extends DolibarrModules
// Permissions
$this->rights = array();
$this->rights_class = 'droitpret';
+ $r=0;
- $this->rights[1][0] = 2200;
- $this->rights[1][1] = 'Lire les droits de prets';
- $this->rights[1][2] = 'r';
- $this->rights[1][3] = 1;
- $this->rights[1][4] = 'lire';
-
- $this->rights[2][0] = 2201;
- $this->rights[2][1] = 'Creer/modifier les droits de prets';
- $this->rights[2][2] = 'w';
- $this->rights[2][3] = 0;
- $this->rights[2][4] = 'creer';
+ $this->rights[$r][0] = 2200;
+ $this->rights[$r][1] = 'Lire les droits de prets';
+ $this->rights[$r][2] = 'r';
+ $this->rights[$r][3] = 1;
+ $this->rights[$r][4] = 'lire';
+
+ $r++;
+ $this->rights[$r][0] = 2201;
+ $this->rights[$r][1] = 'Creer/modifier les droits de prets';
+ $this->rights[$r][2] = 'w';
+ $this->rights[$r][3] = 0;
+ $this->rights[$r][4] = 'creer';
}
diff --git a/htdocs/includes/modules/modEditeur.class.php b/htdocs/includes/modules/modEditeur.class.php
index 119932aea1b..26b9a131e1e 100644
--- a/htdocs/includes/modules/modEditeur.class.php
+++ b/htdocs/includes/modules/modEditeur.class.php
@@ -62,8 +62,10 @@ class modEditeur extends DolibarrModules
// Dir
global $dolibarr_smarty_compile;
global $dolibarr_smarty_cache;
- $this->dirs = array($dolibarr_smarty_compile,
- $dolibarr_smarty_cache);
+ $this->dirs = array();
+
+ $this->dirs[0] = $dolibarr_smarty_compile;
+ $this->dirs[1] = $dolibarr_smarty_cache;
// Config pages
$this->config_page_url = array("editeur.php");
diff --git a/htdocs/includes/modules/modEnergie.class.php b/htdocs/includes/modules/modEnergie.class.php
index 153952e230b..6e0eb20a5a3 100644
--- a/htdocs/includes/modules/modEnergie.class.php
+++ b/htdocs/includes/modules/modEnergie.class.php
@@ -62,10 +62,22 @@ class modEnergie extends DolibarrModules
$this->special = 3;
$this->picto='energie';
- // Dir
+ // Data directories to create when module is enabled
$this->dirs = array();
+ $r=0;
+
+ $this->dirs[$r][0] = "output";
+ $this->dirs[$r][1] = "/energie";
+
+ $r++;
+ $this->dirs[$r][0] = "temp";
+ $this->dirs[$r][1] = "/energie/temp";
+
+ $r++;
+ $this->dirs[$r][0] = "graph";
+ $this->dirs[$r][1] = "/energie/graph";
- // D�pendances
+ // Dependances
$this->depends = array();
// Config pages
@@ -95,7 +107,7 @@ class modEnergie extends DolibarrModules
function init()
{
global $conf;
- // Permissions et valeurs par d�faut
+ // Permissions et valeurs par defaut
$this->remove();
$sql = array();
diff --git a/htdocs/includes/modules/modFournisseur.class.php b/htdocs/includes/modules/modFournisseur.class.php
index 0989c0146a2..e1e57d34e7e 100644
--- a/htdocs/includes/modules/modFournisseur.class.php
+++ b/htdocs/includes/modules/modFournisseur.class.php
@@ -60,10 +60,35 @@ class modFournisseur extends DolibarrModules
$this->special = 0;
$this->picto='company';
- // Dir
+ // Data directories to create when module is enabled
$this->dirs = array();
+ $r=0;
+
+ $this->dirs[$r][0] = "output";
+ $this->dirs[$r][1] = "/fournisseur";
+
+ $r++;
+ $this->dirs[$r][0] = "temp";
+ $this->dirs[$r][1] = "/fournisseur/temp";
+
+ $r++
+ $this->dirs[$r][0] = "commande";
+ $this->dirs[$r][1] = "/fournisseur/commande";
+
+ $r++;
+ $this->dirs[$r][0] = "commande_temp";
+ $this->dirs[$r][1] = "/fournisseur/commande/temp";
+
+ $r++
+ $this->dirs[$r][0] = "facture";
+ $this->dirs[$r][1] = "/fournisseur/facture";
+
+ $r++;
+ $this->dirs[$r][0] = "commande_temp";
+ $this->dirs[$r][1] = "/fournisseur/facture/temp";
- // D�pendances
+
+ // Dependances
$this->depends = array("modSociete");
$this->requiredby = array();
$this->langfiles = array("bills","companies","suppliers");
@@ -257,11 +282,6 @@ class modFournisseur extends DolibarrModules
{
$this->remove();
- // Dir
- $this->dirs[0] = $conf->fournisseur->dir_output;
- //$this->dirs[1] = $conf->fournisseur->commande->dir_output;
- //$this->dirs[2] = $conf->fournisseur->facture->dir_output;
-
$sql = array();
$this->load_datas();
diff --git a/htdocs/includes/modules/modTelephonie.class.php b/htdocs/includes/modules/modTelephonie.class.php
index c47c7087aba..56ca3b17554 100644
--- a/htdocs/includes/modules/modTelephonie.class.php
+++ b/htdocs/includes/modules/modTelephonie.class.php
@@ -21,7 +21,7 @@
/**
\defgroup telephonie Module telephonie
- \brief Module pour g�rer la t�l�phonie
+ \brief Module pour gerer la telephonie
*/
/**
@@ -63,8 +63,49 @@ class modTelephonie extends DolibarrModules
$this->special = 3;
$this->picto='phoning';
- // Dir
+ // Data directories to create when module is enabled
$this->dirs = array();
+ $r=0;
+
+ $this->dirs[$r][0] = "output";
+ $this->dirs[$r][1] = "/telephonie";
+ $r++;
+ $this->dirs[$r][0] = "temp";
+ $this->dirs[$r][1] = "/telephonie/temp";
+ $r++;
+ $this->dirs[$r][0] = "graph";
+ $this->dirs[$r][1] = "/telephonie/graph";
+ $r++;
+ $this->dirs[$r][0] = "logs";
+ $this->dirs[$r][1] = "/telephonie/logs";
+ $r++;
+ $this->dirs[$r][0] = "client";
+ $this->dirs[$r][1] = "/telephonie/client";
+ $r++;
+ $this->dirs[$r][0] = "rapports";
+ $this->dirs[$r][1] = "/telephonie/rapports";
+ $r++;
+ $this->dirs[$r][0] = "ligne";
+ $this->dirs[$r][1] = "/telephonie/ligne";
+ $r++;
+ $this->dirs[$r][0] = "ligne_commande";
+ $this->dirs[$r][1] = "/telephonie/ligne/commande";
+ $r++;
+ $this->dirs[$r][0] = "ligne_commande_retour";
+ $this->dirs[$r][1] = "/telephonie/ligne/commande/retour";
+ $r++;
+ $this->dirs[$r][0] = "ligne_commande_retour_traite";
+ $this->dirs[$r][1] = "/telephonie/ligne/commande/retour/traite";
+ $r++;
+ $this->dirs[$r][0] = "cdr";
+ $this->dirs[$r][1] = "/telephonie/cdr";
+ $r++;
+ $this->dirs[$r][0] = "cdr_archive";
+ $this->dirs[$r][1] = "/telephonie/cdr_archive";
+ $r++;
+ $this->dirs[$r][0] = "cdr_atraiter";
+ $this->dirs[$r][1] = "/telephonie/cdr/atraiter";
+
// Dependances
$this->depends = array();
@@ -274,18 +315,6 @@ class modTelephonie extends DolibarrModules
// Permissions
$this->remove();
- // Dir
- $this->dirs[0] = $conf->telephonie->dir_output;
- $this->dirs[1] = $conf->telephonie->dir_output."/ligne";
- $this->dirs[2] = $conf->telephonie->dir_output."/ligne/commande" ;
- $this->dirs[3] = $conf->telephonie->dir_output."/logs" ;
- $this->dirs[4] = $conf->telephonie->dir_output."/client" ;
- $this->dirs[5] = $conf->telephonie->dir_output."/rapports" ;
- $this->dirs[6] = $conf->telephonie->dir_output."/ligne/commande/retour" ;
- $this->dirs[7] = $conf->telephonie->dir_output."/cdr" ;
- $this->dirs[8] = $conf->telephonie->dir_output."/cdr/archive" ;
- $this->dirs[9] = $conf->telephonie->dir_output."/cdr/atraiter" ;
- $this->dirs[10] = $conf->telephonie->dir_output."/ligne/commande/retour/traite" ;
//
$this->load_tables();
//
diff --git a/htdocs/includes/modules/supplier_order/modules_commandefournisseur.php b/htdocs/includes/modules/supplier_order/modules_commandefournisseur.php
index 59b8c6e8d82..1e22b757fb8 100644
--- a/htdocs/includes/modules/supplier_order/modules_commandefournisseur.php
+++ b/htdocs/includes/modules/supplier_order/modules_commandefournisseur.php
@@ -225,7 +225,7 @@ function supplier_order_delete_preview($db, $propalid)
$client = new Societe($db);
$client->fetch($comfourn->socid);
- if ($conf->fournisseur->commande->dir_output)
+ if ($conf->fournisseur->dir_commande)
{
$comfournref = sanitizeFileName($comfourn->ref);
$dir = $conf->commande->dir_output . "/" . $comfournref ;
diff --git a/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php
index 80b9db6b5e2..e7942d4156b 100644
--- a/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php
+++ b/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php
@@ -124,7 +124,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$outputlangs->setPhpLang();
- if ($conf->fournisseur->commande->dir_output)
+ if ($conf->fournisseur->dir_commande)
{
// D�finition de l'objet $com (pour compatibilite ascendante)
if (! is_object($com))
@@ -138,13 +138,13 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
// D�finition de $dir et $file
if ($com->specimen)
{
- $dir = $conf->fournisseur->commande->dir_output;
+ $dir = $conf->fournisseur->dir_commande;
$file = $dir . "/SPECIMEN.pdf";
}
else
{
$comref = sanitizeFileName($com->ref);
- $dir = $conf->fournisseur->commande->dir_output . "/" . $comref;
+ $dir = $conf->fournisseur->dir_commande . "/" . $comref;
$file = $dir . "/" . $comref . ".pdf";
}
diff --git a/htdocs/includes/triggers/interface_modNotification_Notification.class.php b/htdocs/includes/triggers/interface_modNotification_Notification.class.php
index 5a21a52b9c4..f160fa3f97e 100644
--- a/htdocs/includes/triggers/interface_modNotification_Notification.class.php
+++ b/htdocs/includes/triggers/interface_modNotification_Notification.class.php
@@ -132,7 +132,7 @@ class InterfaceNotification
$action_notify = 3;
$ref = sanitizeFileName($object->ref);
- $filepdf = $conf->fournisseur->commande->dir_output . '/' . $ref . '/' . $ref . '.pdf';
+ $filepdf = $conf->fournisseur->dir_commande . '/' . $ref . '/' . $ref . '.pdf';
$mesg = 'La commande fournisseur '.$object->ref." a été validée.\n";
$notify = new Notify($this->db);
diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php
index e68e2f56fc2..9e16405dbcd 100644
--- a/htdocs/viewimage.php
+++ b/htdocs/viewimage.php
@@ -163,7 +163,7 @@ if ($modulepart)
{
$accessallowed=1;
}
- $original_file=$conf->fournisseur->commande->dir_temp.'/'.$original_file;
+ $original_file=$conf->fournisseur->dir_commande_temp.'/'.$original_file;
}
// Wrapping pour les images des stats factures
@@ -183,7 +183,7 @@ if ($modulepart)
{
$accessallowed=1;
}
- $original_file=$conf->fournisseur->facture->dir_temp.'/'.$original_file;
+ $original_file=$conf->fournisseur->dir_facture_temp.'/'.$original_file;
}
// Wrapping pour les images des stats expeditions
@@ -236,14 +236,14 @@ if ($modulepart)
{
$accessallowed=1;
}
- $original_file=DOL_DATA_ROOT.'/graph/telephonie/'.$original_file;
+ $original_file=$conf->telephonie->dir_graph.'/'.$original_file;
}
// Wrapping pour les graph energie
elseif ($modulepart == 'energie')
{
$accessallowed=1;
- $original_file=DOL_DATA_ROOT.'/energie/graph/'.$original_file;
+ $original_file=$conf->energie->dir_graph.'/'.$original_file;
}
// Wrapping pour les graph bank
@@ -278,14 +278,14 @@ if ($modulepart)
elseif ($modulepart == 'graph_fourn')
{
$accessallowed=1;
- $original_file=DOL_DATA_ROOT.'/fournisseur/temp/'.$original_file;
+ $original_file=$conf->fournisseur->dir_temp.'/'.$original_file;
}
// Wrapping pour les graph des produits
elseif ($modulepart == 'graph_product')
{
$accessallowed=1;
- $original_file=DOL_DATA_ROOT.'/product/temp/'.$original_file;
+ $original_file=$conf->produit->dir_temp.'/'.$original_file;
}
// Wrapping pour les code barre
diff --git a/scripts/energie/graph-line.php b/scripts/energie/graph-line.php
index a92e3fe4395..67530086a28 100644
--- a/scripts/energie/graph-line.php
+++ b/scripts/energie/graph-line.php
@@ -149,7 +149,7 @@ if ($resql_c)
$width = 750;
$height = 300;
- $file= DOL_DATA_ROOT."/energie/graph/all.".$obj_c->rowid.".png";
+ $file = $conf->energie->dir_graph."/all.".$obj_c->rowid.".png";
$group = new PlotGroup;
$group->setPadding(30, 10, NULL, NULL);
@@ -173,7 +173,7 @@ if ($resql_c)
$width = 300;
$height = 90;
- $file= DOL_DATA_ROOT."/energie/graph/small-all.".$obj_c->rowid.".png";
+ $file = $conf->energie->dir_graph."/small-all.".$obj_c->rowid.".png";
$group = new PlotGroup;
$group->setPadding(30, 10, NULL, NULL);
diff --git a/scripts/energie/graph.php b/scripts/energie/graph.php
index cd606cd7725..7b2913f75fd 100644
--- a/scripts/energie/graph.php
+++ b/scripts/energie/graph.php
@@ -140,7 +140,7 @@ if ($resql_c)
$height = 300;
if (sizeof($gdatas) > 2)
{
- $file= DOL_DATA_ROOT."/energie/graph/day.".$obj_c->rowid.".png";
+ $file = $conf->energie->dir_graph."/day.".$obj_c->rowid.".png";
$group = new PlotGroup;
$group->setPadding(30, 10, NULL, NULL);
@@ -176,7 +176,7 @@ if ($resql_c)
}
if (sizeof($gmdatas))
{
- $file= DOL_DATA_ROOT."/energie/graph/month.".$obj_c->rowid.".png";
+ $file = $conf->energie->dir_graph."/month.".$obj_c->rowid.".png";
$group = new PlotGroup;
$group->setPadding(30, 10, NULL, NULL);
@@ -213,7 +213,7 @@ if ($resql_c)
}
if (sizeof($gwdatas))
{
- $file= DOL_DATA_ROOT."/energie/graph/week.".$obj_c->rowid.".png";
+ $file = $conf->energie->dir_graph."/week.".$obj_c->rowid.".png";
$group = new PlotGroup;
$group->setPadding(30, 10, NULL, NULL);
@@ -252,7 +252,7 @@ if ($resql_c)
if (sizeof($gydatas))
{
- $file= DOL_DATA_ROOT."/energie/graph/year.".$obj_c->rowid.".png";
+ $file = $conf->energie->dir_graph."/year.".$obj_c->rowid.".png";
$group = new PlotGroup;
$group->setPadding(30, 10, NULL, NULL);
@@ -335,7 +335,7 @@ if ($resql_g)
$height = 300;
// Hebdo
- $file= DOL_DATA_ROOT."/energie/graph/groupe.week.".$row_g[0].".png";
+ $file = $conf->energie->dir_graph."/groupe.week.".$row_g[0].".png";
$group = new PlotGroup;
$group->setPadding(30, 10, NULL, NULL);
@@ -379,7 +379,7 @@ if ($resql_g)
//
//
//
- $file= DOL_DATA_ROOT."/energie/graph/groupe.month.".$row_g[0].".png";
+ $file = $conf->energie->dir_graph."/groupe.month.".$row_g[0].".png";
$group = new PlotGroup;
$group->setPadding(30, 10, NULL, NULL);
@@ -424,7 +424,7 @@ if ($resql_g)
//
//
//
- $file= DOL_DATA_ROOT."/energie/graph/groupe.year.".$row_g[0].".png";
+ $file = $conf->energie->dir_graph."/groupe.year.".$row_g[0].".png";
$group = new PlotGroup;
$group->setPadding(30, 10, NULL, NULL);