From 7dd6b927b88d9307c22e2865b0a7f9a0a68ac8ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 4 Dec 2004 23:44:02 +0000 Subject: [PATCH] =?UTF-8?q?Qual:=20Toutes=20les=20g=E9n=E9rations=20d'imag?= =?UTF-8?q?es=20se=20font=20dans=20un=20r=E9pertoire=20nomm=E9=20$conf->mo?= =?UTF-8?q?dule->dir=5Fimages.=20Cela=20rend=20uniforme=20le=20code=20qui?= =?UTF-8?q?=20des=20fois=20utilisait=20des=20chemins=20en=20dir,=20des=20f?= =?UTF-8?q?ois=20document=20avec=20s=20et=20des=20fois=20sans.=20Toutes=20?= =?UTF-8?q?les=20images=20sont=20dor=E9navant=20dans=20htdocs/images.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/DolibarrModules.class.php | 3 +-- .../includes/modules/modPrelevement.class.php | 2 ++ .../includes/modules/modTelephonie.class.php | 2 ++ htdocs/master.inc.php | 25 +++++++++++-------- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/htdocs/includes/modules/DolibarrModules.class.php b/htdocs/includes/modules/DolibarrModules.class.php index 60121df5a37..b6cd8bf7941 100644 --- a/htdocs/includes/modules/DolibarrModules.class.php +++ b/htdocs/includes/modules/DolibarrModules.class.php @@ -190,8 +190,7 @@ class DolibarrModules foreach ($this->dirs as $key => $value) { $dir = $value; - - if (! file_exists($dir)) + if ($dir && ! file_exists($dir)) { umask(0); if (! @mkdir($dir, 0755)) diff --git a/htdocs/includes/modules/modPrelevement.class.php b/htdocs/includes/modules/modPrelevement.class.php index 216dd5ccbca..56e248a44eb 100644 --- a/htdocs/includes/modules/modPrelevement.class.php +++ b/htdocs/includes/modules/modPrelevement.class.php @@ -82,6 +82,8 @@ class modPrelevement extends DolibarrModules */ function init() { + global $conf; + // Permissions $this->remove(); diff --git a/htdocs/includes/modules/modTelephonie.class.php b/htdocs/includes/modules/modTelephonie.class.php index d28a1d61909..0a099f52e6f 100644 --- a/htdocs/includes/modules/modTelephonie.class.php +++ b/htdocs/includes/modules/modTelephonie.class.php @@ -79,6 +79,8 @@ class modTelephonie extends DolibarrModules */ function init() { + global $conf; + // Permissions $this->remove(); diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index a630bdeaaf0..ff9ce2161c4 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -169,22 +169,22 @@ if (defined("MAIN_MODULE_EXTERNALRSS")) if (defined("MAIN_MODULE_COMMANDE")) { $conf->commande->enabled=MAIN_MODULE_COMMANDE; - $conf->commande->dir_ouput=DOL_DATA_ROOT."/commande"; + $conf->commande->dir_output=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."/expedition"; + $conf->expedition->dir_output=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_output=DOL_DATA_ROOT."/societe"; + if (defined(SOCIETE_OUTPUTDIR) && SOCIETE_OUTPUTDIR) { $conf->societe->dir_output=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"); @@ -225,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."/produit"; + $conf->produit->dir_output=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"); @@ -233,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."/produit"; + $conf->service->dir_output=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"); @@ -269,13 +269,16 @@ 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_output=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")) { $conf->prelevement->enabled=MAIN_MODULE_PRELEVEMENT; + $conf->prelevement->dir_output=DOL_DATA_ROOT."/prelevement"; + $conf->prelevement->dir_images=DOL_DOCUMENT_ROOT."/images/prelevement"; + $conf->prelevement->url_images=DOL_URL_ROOT."/images/prelevement"; } if (defined("MAIN_MODULE_WEBCALENDAR")) { @@ -290,7 +293,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."/facture"; + $conf->facture->dir_output=DOL_DATA_ROOT."/facture"; $conf->facture->dir_images=DOL_DOCUMENT_ROOT."/images/facture"; $conf->facture->url_images=DOL_URL_ROOT."/images/facture"; } @@ -298,15 +301,15 @@ 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."/propale"; + $conf->propale->dir_output=DOL_DATA_ROOT."/propale"; $conf->propale->dir_images=DOL_DOCUMENT_ROOT."/images/propale"; $conf->propale->url_images=DOL_URL_ROOT."/images/propale"; - // \todo modifier le code des propales pour utiliser $conf->propale->dir_ouput au lieu de la constante + // \todo modifier le code des propales pour utiliser $conf->propale->dir_output au lieu de la constante if (! defined("PROPALE_OUTPUTDIR")) { define('PROPALE_OUTPUTDIR', DOL_DOCUMENT_ROOT . "/document/propale"); - $conf->propale->dir_ouput=DOL_DOCUMENT_ROOT . "/document/propale"; + $conf->propale->dir_output=DOL_DOCUMENT_ROOT . "/document/propale"; } if (! defined("PROPALE_OUTPUT_URL")) {