mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 17:13:03 +01:00
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:
@@ -607,12 +607,14 @@ if ($_GET["propalid"])
|
||||
{
|
||||
if ($user->rights->propale->envoyer)
|
||||
{
|
||||
$file = $conf->propal->dir_output . "/$obj->ref/$obj->ref.pdf";
|
||||
if (file_exists($file))
|
||||
{
|
||||
print "<a class=\"tabAction\" href=\"propal.php?propalid=$propal->id&action=presend\">".$langs->trans("Send")."</a>";
|
||||
}
|
||||
}
|
||||
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
||||
$propref = str_replace($forbidden_chars,"_",$obj->ref);
|
||||
$file = $conf->propal->dir_output . "/$propref/$propref.pdf";
|
||||
if (file_exists($file))
|
||||
{
|
||||
print "<a class=\"tabAction\" href=\"propal.php?propalid=$propal->id&action=presend\">".$langs->trans("Send")."</a>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Delete
|
||||
@@ -645,7 +647,9 @@ if ($_GET["propalid"])
|
||||
*/
|
||||
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))
|
||||
{
|
||||
|
||||
@@ -702,8 +706,10 @@ if ($_GET["propalid"])
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$file = $conf->propal->dir_output . "/$propal->ref/$propal->ref.pdf";
|
||||
$relativepath = "$propal->ref/$propal->ref.pdf";
|
||||
$forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","=");
|
||||
$propref = str_replace($forbidden_chars,"_",$propal->ref);
|
||||
$file = $conf->propal->dir_output . "/$propref/$propref.pdf";
|
||||
$relativepath = "$propref/$propref.pdf";
|
||||
|
||||
$var=true;
|
||||
|
||||
|
||||
@@ -72,7 +72,9 @@ class pdf_propale_adytek extends ModelePDFPropales
|
||||
|
||||
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))
|
||||
{
|
||||
umask(0);
|
||||
@@ -89,7 +91,9 @@ class pdf_propale_adytek extends ModelePDFPropales
|
||||
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))
|
||||
{
|
||||
|
||||
@@ -72,7 +72,9 @@ class pdf_propale_bleu extends ModelePDFPropales
|
||||
|
||||
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))
|
||||
{
|
||||
umask(0);
|
||||
@@ -89,7 +91,9 @@ class pdf_propale_bleu extends ModelePDFPropales
|
||||
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))
|
||||
{
|
||||
|
||||
@@ -72,7 +72,9 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
|
||||
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))
|
||||
{
|
||||
umask(0);
|
||||
@@ -89,7 +91,9 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
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))
|
||||
{
|
||||
|
||||
@@ -74,7 +74,9 @@ class pdf_propale_rouge extends ModelePDFPropales
|
||||
|
||||
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))
|
||||
{
|
||||
umask(0);
|
||||
@@ -91,7 +93,9 @@ class pdf_propale_rouge extends ModelePDFPropales
|
||||
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))
|
||||
{
|
||||
|
||||
@@ -72,7 +72,9 @@ class pdf_propale_vert extends ModelePDFPropales
|
||||
|
||||
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))
|
||||
{
|
||||
umask(0);
|
||||
@@ -89,7 +91,9 @@ class pdf_propale_vert extends ModelePDFPropales
|
||||
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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user