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:
Regis Houssin 2009-04-28 18:14:50 +00:00
parent de62cad5bd
commit 3d149a33ca
25 changed files with 199 additions and 113 deletions

View File

@ -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);

View File

@ -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 = '<a href="month.php?year='.($year - 1).'&amp;mode='.$mode.'">'.img_previous().'</a> ';

View File

@ -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);

View File

@ -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 = '<a href="month.php?year='.($year - 1).'&amp;mode='.$mode.'">'.img_previous().'</a> ';

View File

@ -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

View File

@ -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'";
}

View File

@ -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 = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
@ -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);

View File

@ -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;

View File

@ -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'));

View File

@ -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();

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
* 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

View File

@ -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();

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
/* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
* 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");

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2003,2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
* 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();

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
/* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
* 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';
}

View File

@ -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");

View File

@ -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<EFBFBD>faut
// Permissions et valeurs par defaut
$this->remove();
$sql = array();

View File

@ -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();

View File

@ -21,7 +21,7 @@
/**
\defgroup telephonie Module telephonie
\brief Module pour g<EFBFBD>rer la t<EFBFBD>l<EFBFBD>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();
//

View File

@ -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 ;

View File

@ -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";
}

View File

@ -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);

View File

@ -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

View File

@ -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);

View File

@ -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);