un "/" dans le numéro de propale causait une erreur de création du fichier PDF.
Le nom de fichier et de répertoire est filtré par une table forbidden_chars.
This commit is contained in:
parent
3d881cecd2
commit
00eb9f33ef
@ -607,12 +607,14 @@ if ($_GET["propalid"])
|
|||||||
{
|
{
|
||||||
if ($user->rights->propale->envoyer)
|
if ($user->rights->propale->envoyer)
|
||||||
{
|
{
|
||||||
$file = $conf->propal->dir_output . "/$obj->ref/$obj->ref.pdf";
|
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
||||||
if (file_exists($file))
|
$propref = str_replace($forbidden_chars,"_",$obj->ref);
|
||||||
{
|
$file = $conf->propal->dir_output . "/$propref/$propref.pdf";
|
||||||
print "<a class=\"tabAction\" href=\"propal.php?propalid=$propal->id&action=presend\">".$langs->trans("Send")."</a>";
|
if (file_exists($file))
|
||||||
}
|
{
|
||||||
}
|
print "<a class=\"tabAction\" href=\"propal.php?propalid=$propal->id&action=presend\">".$langs->trans("Send")."</a>";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete
|
// Delete
|
||||||
@ -645,7 +647,9 @@ if ($_GET["propalid"])
|
|||||||
*/
|
*/
|
||||||
if ($_GET["action"] == 'send')
|
if ($_GET["action"] == 'send')
|
||||||
{
|
{
|
||||||
$file = $conf->propal->dir_output . "/$propal->ref/$propal->ref.pdf";
|
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
||||||
|
$propref = str_replace($forbidden_chars,"_",$propal->ref);
|
||||||
|
$file = $conf->propal->dir_output . "/$propref/$propref.pdf";
|
||||||
if (file_exists($file))
|
if (file_exists($file))
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -702,8 +706,10 @@ if ($_GET["propalid"])
|
|||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
$file = $conf->propal->dir_output . "/$propal->ref/$propal->ref.pdf";
|
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
||||||
$relativepath = "$propal->ref/$propal->ref.pdf";
|
$propref = str_replace($forbidden_chars,"_",$propal->ref);
|
||||||
|
$file = $conf->propal->dir_output . "/$propref/$propref.pdf";
|
||||||
|
$relativepath = "$propref/$propref.pdf";
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
|
|||||||
@ -72,7 +72,9 @@ class pdf_propale_adytek extends ModelePDFPropales
|
|||||||
|
|
||||||
if ($conf->propal->dir_output)
|
if ($conf->propal->dir_output)
|
||||||
{
|
{
|
||||||
$dir = $conf->propal->dir_output . "/" . $propale->ref ;
|
$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);
|
umask(0);
|
||||||
@ -89,7 +91,9 @@ class pdf_propale_adytek extends ModelePDFPropales
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = $dir . "/" . $propale->ref . ".pdf";
|
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
||||||
|
$propref = str_replace($forbidden_chars,"_",$propale->ref);
|
||||||
|
$file = $dir . "/" . $propref . ".pdf";
|
||||||
|
|
||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -72,7 +72,9 @@ class pdf_propale_bleu extends ModelePDFPropales
|
|||||||
|
|
||||||
if ($conf->propal->dir_output)
|
if ($conf->propal->dir_output)
|
||||||
{
|
{
|
||||||
$dir = $conf->propal->dir_output . "/" . $propale->ref ;
|
$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);
|
umask(0);
|
||||||
@ -89,7 +91,9 @@ class pdf_propale_bleu extends ModelePDFPropales
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = $dir . "/" . $propale->ref . ".pdf";
|
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
||||||
|
$propref = str_replace($forbidden_chars,"_",$propale->ref);
|
||||||
|
$file = $dir . "/" . $propref . ".pdf";
|
||||||
|
|
||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -72,7 +72,9 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
|
|
||||||
if ($conf->propal->dir_output)
|
if ($conf->propal->dir_output)
|
||||||
{
|
{
|
||||||
$dir = $conf->propal->dir_output . "/" . $propale->ref ;
|
$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);
|
umask(0);
|
||||||
@ -89,7 +91,9 @@ class pdf_propale_jaune extends ModelePDFPropales
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = $dir . "/" . $propale->ref . ".pdf";
|
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
||||||
|
$propref = str_replace($forbidden_chars,"_",$propale->ref);
|
||||||
|
$file = $dir . "/" . $propref . ".pdf";
|
||||||
|
|
||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -74,7 +74,9 @@ class pdf_propale_rouge extends ModelePDFPropales
|
|||||||
|
|
||||||
if ($conf->propal->dir_output)
|
if ($conf->propal->dir_output)
|
||||||
{
|
{
|
||||||
$dir = $conf->propal->dir_output . "/" . $propale->ref ;
|
$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);
|
umask(0);
|
||||||
@ -91,7 +93,9 @@ class pdf_propale_rouge extends ModelePDFPropales
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = $dir . "/" . $propale->ref . ".pdf";
|
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
||||||
|
$propref = str_replace($forbidden_chars,"_",$propale->ref);
|
||||||
|
$file = $dir . "/" . $propref . ".pdf";
|
||||||
|
|
||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -72,7 +72,9 @@ class pdf_propale_vert extends ModelePDFPropales
|
|||||||
|
|
||||||
if ($conf->propal->dir_output)
|
if ($conf->propal->dir_output)
|
||||||
{
|
{
|
||||||
$dir = $conf->propal->dir_output . "/" . $propale->ref ;
|
$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);
|
umask(0);
|
||||||
@ -89,7 +91,9 @@ class pdf_propale_vert extends ModelePDFPropales
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = $dir . "/" . $propale->ref . ".pdf";
|
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
||||||
|
$propref = str_replace($forbidden_chars,"_",$propale->ref);
|
||||||
|
$file = $dir . "/" . $propref . ".pdf";
|
||||||
|
|
||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user