Qual: Toutes les gnrations d'images se font dans un rpertoire nomm $conf->module->dir_images. Cela rend uniforme le code qui des fois utilisait des chemins en dir, des fois document avec s et des fois sans.
Toutes les images sont dornavant dans htdocs/images.
This commit is contained in:
parent
dcfddfed4c
commit
6358b7f038
@ -36,7 +36,9 @@ llxHeader();
|
||||
$mesg = "";
|
||||
$socid=$_GET["socid"];
|
||||
|
||||
$upload_dir = SOCIETE_OUTPUTDIR . "/" . $socid ;
|
||||
if (! is_dir($conf->societe->dir_output)) { mkdir($conf->societe->dir_output); }
|
||||
|
||||
$upload_dir = $conf->societe->dir_output . "/" . $socid ;
|
||||
|
||||
if (! is_dir($upload_dir))
|
||||
{
|
||||
|
||||
@ -45,6 +45,8 @@ class modPrelevement extends DolibarrModules
|
||||
*/
|
||||
function modPrelevement($DB)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$this->db = $DB ;
|
||||
$this->numero = 57 ;
|
||||
|
||||
@ -57,7 +59,7 @@ class modPrelevement extends DolibarrModules
|
||||
|
||||
// Dir
|
||||
$this->dirs = array();
|
||||
$this->data_directory = DOL_DATA_ROOT . "/prelevement/bon/";
|
||||
$this->data_directory = $conf->prelevement->dir_output . "/bon";
|
||||
|
||||
// Dépendances
|
||||
$this->depends = array();
|
||||
@ -102,8 +104,8 @@ class modPrelevement extends DolibarrModules
|
||||
$this->rights[2][3] = 0;
|
||||
|
||||
// Dir
|
||||
$this->dirs[0] = DOL_DATA_ROOT . "/prelevement/" ;
|
||||
$this->dirs[1] = DOL_DATA_ROOT . "/prelevement/bon" ;
|
||||
$this->dirs[0] = $conf->prelevement->dir_output;
|
||||
$this->dirs[1] = $conf->prelevement->dir_output."/bon" ;
|
||||
|
||||
$sql = array();
|
||||
|
||||
|
||||
@ -122,12 +122,12 @@ class modTelephonie extends DolibarrModules
|
||||
$this->rights[6][5] = 'creer';
|
||||
|
||||
// Dir
|
||||
$this->dirs[0] = DOL_DATA_ROOT . "/telephonie/" ;
|
||||
$this->dirs[1] = DOL_DATA_ROOT . "/telephonie/ligne/" ;
|
||||
$this->dirs[2] = DOL_DATA_ROOT . "/telephonie/ligne/commande" ;
|
||||
$this->dirs[3] = DOL_DATA_ROOT . "/telephonie/logs" ;
|
||||
$this->dirs[4] = DOL_DATA_ROOT . "/telephonie/client" ;
|
||||
$this->dirs[5] = DOL_DATA_ROOT . "/telephonie/rapports" ;
|
||||
$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" ;
|
||||
|
||||
return $this->_init($sql);
|
||||
|
||||
|
||||
@ -53,10 +53,15 @@ if (! isset($dolibarr_main_db_type))
|
||||
{
|
||||
$dolibarr_main_db_type='mysql'; // Pour compatibilité avec anciennes configs, si non défini, on prend 'mysql'
|
||||
}
|
||||
|
||||
if (! $dolibarr_main_data_root) {
|
||||
// Si le répertoire documents non défini, on utilise celui par défaut
|
||||
$dolibarr_main_data_root=ereg_replace("/htdocs","",$dolibarr_main_document_root);
|
||||
$dolibarr_main_data_root.="/documents";
|
||||
}
|
||||
define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root);
|
||||
define('DOL_DATA_ROOT', $dolibarr_main_data_root);
|
||||
|
||||
|
||||
if (strtolower(substr($dolibarr_main_url_root, 0, 7)) == 'http://')
|
||||
{
|
||||
$uri = substr($dolibarr_main_url_root, 7);
|
||||
@ -164,20 +169,24 @@ if (defined("MAIN_MODULE_EXTERNALRSS"))
|
||||
if (defined("MAIN_MODULE_COMMANDE"))
|
||||
{
|
||||
$conf->commande->enabled=MAIN_MODULE_COMMANDE;
|
||||
$conf->commande->dir_ouput=DOL_DATA_ROOT."/documents/commande";
|
||||
$conf->commande->dir_ouput=DOL_DATA_ROOT."/commande";
|
||||
$conf->commande->dir_images=DOL_DOCUMENT_ROOT."/images/commande";
|
||||
$conf->commande->url_images=DOL_URL_ROOT."/images/commande";
|
||||
}
|
||||
if (defined("MAIN_MODULE_EXPEDITION"))
|
||||
{
|
||||
$conf->expedition->enabled=MAIN_MODULE_EXPEDITION;
|
||||
$conf->expedition->dir_ouput=DOL_DATA_ROOT."/documents/expedition";
|
||||
$conf->expedition->dir_ouput=DOL_DATA_ROOT."/expedition";
|
||||
$conf->expedition->dir_images=DOL_DOCUMENT_ROOT."/images/expedition";
|
||||
$conf->expedition->url_images=DOL_URL_ROOT."/images/expedition";
|
||||
}
|
||||
if (defined("MAIN_MODULE_SOCIETE"))
|
||||
{
|
||||
$conf->societe->enabled=MAIN_MODULE_SOCIETE;
|
||||
$conf->societe->dir_ouput=DOL_DATA_ROOT."/societe";
|
||||
if (defined(SOCIETE_OUTPUTDIR) && SOCIETE_OUTPUTDIR) { $conf->societe->dir_ouput=SOCIETE_OUTPUTDIR; }
|
||||
$conf->societe->dir_images=DOL_DOCUMENT_ROOT."/images/societe";
|
||||
$conf->societe->url_images=DOL_URL_ROOT."/images/societe";
|
||||
require_once(DOL_DOCUMENT_ROOT ."/societe.class.php");
|
||||
}
|
||||
if (defined("MAIN_MODULE_COMMERCIAL"))
|
||||
@ -216,7 +225,7 @@ if (defined("MAIN_MODULE_ADHERENT"))
|
||||
if (defined("MAIN_MODULE_PRODUIT"))
|
||||
{
|
||||
$conf->produit->enabled=MAIN_MODULE_PRODUIT;
|
||||
$conf->produit->dir_ouput=DOL_DATA_ROOT."/documents/produit";
|
||||
$conf->produit->dir_ouput=DOL_DATA_ROOT."/produit";
|
||||
$conf->produit->dir_images=DOL_DOCUMENT_ROOT."/images/produit";
|
||||
$conf->produit->url_images=DOL_URL_ROOT."/images/produit";
|
||||
require_once(DOL_DOCUMENT_ROOT ."/product.class.php");
|
||||
@ -224,7 +233,7 @@ if (defined("MAIN_MODULE_PRODUIT"))
|
||||
if (defined("MAIN_MODULE_SERVICE"))
|
||||
{
|
||||
$conf->service->enabled=MAIN_MODULE_SERVICE;
|
||||
$conf->service->dir_ouput=DOL_DATA_ROOT."/documents/produit";
|
||||
$conf->service->dir_ouput=DOL_DATA_ROOT."/produit";
|
||||
$conf->service->dir_images=DOL_DOCUMENT_ROOT."/images/produit";
|
||||
$conf->service->url_images=DOL_URL_ROOT."/images/produit";
|
||||
require_once(DOL_DOCUMENT_ROOT ."/product.class.php");
|
||||
@ -260,6 +269,9 @@ if (defined("MAIN_MODULE_POSTNUKE"))
|
||||
if (defined("MAIN_MODULE_TELEPHONIE"))
|
||||
{
|
||||
$conf->telephonie->enabled=MAIN_MODULE_TELEPHONIE;
|
||||
$conf->telephonie->dir_ouput=DOL_DATA_ROOT."/telephonie";
|
||||
$conf->telephonie->dir_images=DOL_DOCUMENT_ROOT."/images/telephonie";
|
||||
$conf->telephonie->url_images=DOL_URL_ROOT."/images/telephonie";
|
||||
}
|
||||
if (defined("MAIN_MODULE_PRELEVEMENT"))
|
||||
{
|
||||
@ -278,7 +290,7 @@ if (defined("MAIN_MODULE_FACTURE"))
|
||||
{
|
||||
$conf->facture->enabled=MAIN_MODULE_FACTURE;
|
||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php");
|
||||
$conf->facture->dir_ouput=DOL_DATA_ROOT."/documents/facture";
|
||||
$conf->facture->dir_ouput=DOL_DATA_ROOT."/facture";
|
||||
$conf->facture->dir_images=DOL_DOCUMENT_ROOT."/images/facture";
|
||||
$conf->facture->url_images=DOL_URL_ROOT."/images/facture";
|
||||
}
|
||||
@ -286,7 +298,7 @@ if (defined("MAIN_MODULE_PROPALE"))
|
||||
{
|
||||
$conf->propal->enabled=MAIN_MODULE_PROPALE;
|
||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/modules_propale.php");
|
||||
$conf->propale->dir_ouput=DOL_DATA_ROOT."/documents/propale";
|
||||
$conf->propale->dir_ouput=DOL_DATA_ROOT."/propale";
|
||||
$conf->propale->dir_images=DOL_DOCUMENT_ROOT."/images/propale";
|
||||
$conf->propale->url_images=DOL_URL_ROOT."/images/propale";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user