Fix: Pb creation répertoire.

This commit is contained in:
Laurent Destailleur 2005-06-28 22:13:53 +00:00
parent c08f71beaa
commit 79c0871497
8 changed files with 85 additions and 92 deletions

View File

@ -67,8 +67,7 @@ class pdf_adytek extends ModelePDFFactures {
if (! file_exists($dir)) if (! file_exists($dir))
{ {
umask(0); if (create_exdir($dir) < 0)
if (! mkdir($dir, 0755))
{ {
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir); $this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
return 0; return 0;

View File

@ -64,8 +64,7 @@ class pdf_bernique extends ModelePDFFactures {
if (! file_exists($dir)) if (! file_exists($dir))
{ {
umask(0); if (create_exdir($dir) < 0)
if (! mkdir($dir, 0755))
{ {
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir); $this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
return 0; return 0;

View File

@ -62,8 +62,7 @@ class pdf_bigorneau extends ModelePDFFactures {
if (! file_exists($dir)) if (! file_exists($dir))
{ {
umask(0); if (create_exdir($dir) < 0)
if (! mkdir($dir, 0755))
{ {
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir); $this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
return 0; return 0;

View File

@ -66,8 +66,7 @@ class pdf_bulot extends ModelePDFFactures {
if (! file_exists($dir)) if (! file_exists($dir))
{ {
umask(0); if (create_exdir($dir) < 0)
if (! mkdir($dir, 0755))
{ {
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir); $this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
return 0; return 0;

View File

@ -112,8 +112,7 @@ class pdf_crabe extends ModelePDFFactures
if (! file_exists($dir)) if (! file_exists($dir))
{ {
umask(0); if (create_exdir($dir) < 0)
if (! mkdir($dir, 0755))
{ {
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir); $this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
return 0; return 0;
@ -579,7 +578,7 @@ class pdf_crabe extends ModelePDFFactures
if (defined("FAC_PDF_LOGO") && FAC_PDF_LOGO) if (defined("FAC_PDF_LOGO") && FAC_PDF_LOGO)
{ {
if (file_exists(FAC_PDF_LOGO)) { if (file_exists(FAC_PDF_LOGO)) {
$pdf->Image(FAC_PDF_LOGO, 10, 5, 0, 24, 'PNG'); $pdf->Image(FAC_PDF_LOGO, 10, 5, 0, 24);
} }
else { else {
$pdf->SetTextColor(200,0,0); $pdf->SetTextColor(200,0,0);

View File

@ -113,8 +113,7 @@ class pdf_oursin extends ModelePDFFactures
if (! file_exists($dir)) if (! file_exists($dir))
{ {
umask(0); if (create_exdir($dir) < 0)
if (! mkdir($dir, 0755))
{ {
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir); $this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
return 0; return 0;

View File

@ -62,8 +62,7 @@ class pdf_tourteau extends ModelePDFFactures {
if (! file_exists($dir)) if (! file_exists($dir))
{ {
umask(0); if (create_exdir($dir) < 0)
if (! mkdir($dir, 0755))
{ {
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir); $this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
return 0; return 0;

View File

@ -75,7 +75,7 @@ if ($_GET["id"])
if (! file_exists($dir)) if (! file_exists($dir))
{ {
if (! create_exdir($dir)) if (create_exdir($dir) < 0)
{ {
$mesg = $langs->trans("ErrorCanNotCreateDir",$dir); $mesg = $langs->trans("ErrorCanNotCreateDir",$dir);
} }