Fix: Pb creation répertoire.

This commit is contained in:
Laurent Destailleur 2005-06-28 22:38:58 +00:00
parent 6ddfc3acb3
commit 5b727e25eb
6 changed files with 64 additions and 67 deletions

View File

@ -75,10 +75,10 @@ class pdf_propale_adytek extends ModelePDFPropales
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","="); $forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
$propref = str_replace($forbidden_chars,"_",$propale->ref); $propref = str_replace($forbidden_chars,"_",$propale->ref);
$dir = $conf->propal->dir_output . "/" . $propref ; $dir = $conf->propal->dir_output . "/" . $propref ;
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

@ -122,8 +122,7 @@ class pdf_propale_azur extends ModelePDFPropales
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,10 +75,10 @@ class pdf_propale_bleu extends ModelePDFPropales
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","="); $forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
$propref = str_replace($forbidden_chars,"_",$propale->ref); $propref = str_replace($forbidden_chars,"_",$propale->ref);
$dir = $conf->propal->dir_output . "/" . $propref ; $dir = $conf->propal->dir_output . "/" . $propref ;
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

@ -77,8 +77,7 @@ class pdf_propale_jaune extends ModelePDFPropales
$dir = $conf->propal->dir_output . "/" . $propref ; $dir = $conf->propal->dir_output . "/" . $propref ;
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

@ -77,10 +77,10 @@ class pdf_propale_rouge extends ModelePDFPropales
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","="); $forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
$propref = str_replace($forbidden_chars,"_",$propale->ref); $propref = str_replace($forbidden_chars,"_",$propale->ref);
$dir = $conf->propal->dir_output . "/" . $propref ; $dir = $conf->propal->dir_output . "/" . $propref ;
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

@ -77,8 +77,7 @@ class pdf_propale_vert extends ModelePDFPropales
$dir = $conf->propal->dir_output . "/" . $propref ; $dir = $conf->propal->dir_output . "/" . $propref ;
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;