From 926253e5d11dd04a6f06cb94176ea9079522cd29 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 1 Sep 2003 10:21:13 +0000 Subject: [PATCH] Modif creation du repertoire --- .../includes/modules/rapport/pdf_paiement.class.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/includes/modules/rapport/pdf_paiement.class.php b/htdocs/includes/modules/rapport/pdf_paiement.class.php index 393c3c47a10..ab8a11ed67c 100644 --- a/htdocs/includes/modules/rapport/pdf_paiement.class.php +++ b/htdocs/includes/modules/rapport/pdf_paiement.class.php @@ -28,7 +28,7 @@ Class pdf_paiement { $this->db = $db; $this->description = "Liste des paiements"; - $this->dir = $GLOBALS["DOCUMENT_ROOT"]."/document/rapport/"; + $this->dir = DOL_DOCUMENT_ROOT."/document/rapport/"; $this->file = $this->dir . "paiements" . ".pdf"; @@ -122,11 +122,14 @@ Class pdf_paiement { Function write_pdf_file() { - global $conf; - if (! file_exists($this->dir)) { - mkdir($this->dir, 755); + umask(0); + if (! mkdir($this->dir, 0755)) + { + print "Impossible de créer $this->dir !"; + die; + } } $pdf = new FPDF('P','mm','A4');