From 9a496247badcd485f1c3c42c6b975b88df2e7bff Mon Sep 17 00:00:00 2001 From: opensides Date: Fri, 4 Feb 2005 22:40:38 +0000 Subject: [PATCH] correction des bugs soumis sur le forum http://forum.dolibarr.com/viewtopic.php?t=51 http://forum.dolibarr.com/viewtopic.php?t=54 --- htdocs/includes/modules/facture/modules_facture.php | 8 +++++--- htdocs/propal.class.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/includes/modules/facture/modules_facture.php b/htdocs/includes/modules/facture/modules_facture.php index 98df8f3fc1e..e8e7dba1c30 100644 --- a/htdocs/includes/modules/facture/modules_facture.php +++ b/htdocs/includes/modules/facture/modules_facture.php @@ -154,9 +154,11 @@ function facture_meta_create($db, $facid, $message="") if ($conf->facture->dir_output) { - $dir = $conf->facture->dir_output . "/" . $fac->ref ; - $file = $dir . "/" . $fac->ref . ".meta"; - + $forbidden_chars=array("/","\\",":","*","?","\"","<",">","|","[","]",",",";","="); + $facref = str_replace($forbidden_chars,"_",$fac->ref); + $dir = $conf->facture->dir_output . "/" . $facref ; + $file = $dir . "/" . $facref . ".meta"; + if (! file_exists($dir)) { umask(0); diff --git a/htdocs/propal.class.php b/htdocs/propal.class.php index a69cde78ebb..901e313b4b5 100644 --- a/htdocs/propal.class.php +++ b/htdocs/propal.class.php @@ -382,7 +382,7 @@ class Propal $this->total_ttc = $obj->total; $this->socidp = $obj->fk_soc; $this->soc_id = $obj->fk_soc; - $this->projet_id = $obj->fk_projet; + $this->projetidp = $obj->fk_projet; $this->contactid = $obj->fk_soc_contact; $this->modelpdf = $obj->model_pdf; $this->note = $obj->note;