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,15 +75,15 @@ class pdf_propale_adytek extends ModelePDFPropales
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
$propref = str_replace($forbidden_chars,"_",$propale->ref);
$dir = $conf->propal->dir_output . "/" . $propref ;
if (! file_exists($dir))
{
umask(0);
if (! mkdir($dir, 0755))
if (! file_exists($dir))
{
if (create_exdir($dir) < 0)
{
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
return 0;
}
}
}
}
else
{

View File

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

View File

@ -75,15 +75,15 @@ class pdf_propale_bleu extends ModelePDFPropales
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
$propref = str_replace($forbidden_chars,"_",$propale->ref);
$dir = $conf->propal->dir_output . "/" . $propref ;
if (! file_exists($dir))
{
umask(0);
if (! mkdir($dir, 0755))
if (! file_exists($dir))
{
if (create_exdir($dir) < 0)
{
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
return 0;
}
}
}
}
else
{

View File

@ -75,15 +75,14 @@ class pdf_propale_jaune extends ModelePDFPropales
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
$propref = str_replace($forbidden_chars,"_",$propale->ref);
$dir = $conf->propal->dir_output . "/" . $propref ;
if (! file_exists($dir))
{
umask(0);
if (! mkdir($dir, 0755))
{
if (! file_exists($dir))
{
if (create_exdir($dir) < 0)
{
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
return 0;
}
}
}
}
else
{

View File

@ -77,10 +77,10 @@ class pdf_propale_rouge extends ModelePDFPropales
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
$propref = str_replace($forbidden_chars,"_",$propale->ref);
$dir = $conf->propal->dir_output . "/" . $propref ;
if (! file_exists($dir))
if (! file_exists($dir))
{
umask(0);
if (! mkdir($dir, 0755))
if (create_exdir($dir) < 0)
{
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
return 0;

View File

@ -75,15 +75,14 @@ class pdf_propale_vert extends ModelePDFPropales
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
$propref = str_replace($forbidden_chars,"_",$propale->ref);
$dir = $conf->propal->dir_output . "/" . $propref ;
if (! file_exists($dir))
{
umask(0);
if (! mkdir($dir, 0755))
{
if (! file_exists($dir))
{
if (create_exdir($dir) < 0)
{
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
return 0;
}
}
}
}
else
{