From 8e2b8c2a2746278946b09763812bfe9e43b0f7ec Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Feb 2005 16:34:11 +0000 Subject: [PATCH] =?UTF-8?q?Qual:=20Toutes=20les=20images=20g=E9n=E9r=E9es?= =?UTF-8?q?=20ou=20non=20(stats,=20photo=20utilisateurs)=20sont=20affich?= =?UTF-8?q?=E9es=20=E0=20travers=20le=20wrapper=20viewimage.php=20qui=20fo?= =?UTF-8?q?nctionne=20sur=20le=20m=EAme=20principe=20que=20le=20wrapper=20?= =?UTF-8?q?document.php=20pour=20les=20documents.=20Il=20permet=20de=20v?= =?UTF-8?q?=E9rifier=20les=20droits.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/stats/index.php | 6 +++++- htdocs/includes/modules/modCommande.class.php | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 20bc55f2569..dfe3514227a 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -54,7 +54,11 @@ $stats = new CommandeStats($db, $socidp); $year = strftime("%Y", time()); $data = $stats->getNbCommandeByMonthWithPrevYear($year); -if (! is_dir($conf->commande->dir_images)) { mkdir($conf->commande->dir_images); } +if (! is_dir($conf->commande->dir_images)) +{ + mkdir($conf->commande->dir_output); + mkdir($conf->commande->dir_images); +} $filename = $conf->commande->dir_images."/nbcommande2year-".$year.".png"; $fileurl = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=nbcommande2year-'.$year.'.png'; diff --git a/htdocs/includes/modules/modCommande.class.php b/htdocs/includes/modules/modCommande.class.php index 5d3c10540da..dd60ef8e8a6 100644 --- a/htdocs/includes/modules/modCommande.class.php +++ b/htdocs/includes/modules/modCommande.class.php @@ -89,6 +89,8 @@ class modCommande extends DolibarrModules */ function init() { + global $conf; + // Permissions $this->remove(); @@ -117,6 +119,10 @@ class modCommande extends DolibarrModules $this->rights[4][2] = 'd'; $this->rights[4][3] = 0; + // Dir + $this->dirs[0] = $conf->commande->dir_output; + $this->dirs[1] = $conf->commande->dir_images; + $sql = array(); return $this->_init($sql);