Modif creation du repertoire

This commit is contained in:
Rodolphe Quiedeville 2003-09-01 10:21:13 +00:00
parent c4db416930
commit 926253e5d1

View File

@ -28,7 +28,7 @@ Class pdf_paiement {
$this->db = $db; $this->db = $db;
$this->description = "Liste des paiements"; $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"; $this->file = $this->dir . "paiements" . ".pdf";
@ -122,11 +122,14 @@ Class pdf_paiement {
Function write_pdf_file() Function write_pdf_file()
{ {
global $conf;
if (! file_exists($this->dir)) 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'); $pdf = new FPDF('P','mm','A4');