From 50dca584c4933d44577ec8ff887cf5d61203f08c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 7 Jun 2006 20:10:06 +0000 Subject: [PATCH] =?UTF-8?q?Suppression=20des=20addslashes.=20En=20effet,?= =?UTF-8?q?=20les=20donn=E9es=20ne=20doivent=20jamais=20contenir=20une=20v?= =?UTF-8?q?aleur=20"transform=E9e"=20de=20leur=20valeur=20mais=20c'est=20u?= =?UTF-8?q?niquement=20dans=20l'ordre=20insert=20que=20le=20addslashes=20d?= =?UTF-8?q?oit=20etre=20ajout=E9.=20Ceci=20ces=20donn=E9es=20peuvent=20etr?= =?UTF-8?q?e=20manipul=E9es=20par=20d'autres=20portions=20de=20code=20que?= =?UTF-8?q?=20le=20insert=20qui=20elle=20requiert=20la=20donn=E9e=20d'orig?= =?UTF-8?q?ine.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/facture.class.php | 19 +++++++++---------- htdocs/product.class.php | 6 +++--- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php index 180fcaf1bd9..def8f82ae69 100644 --- a/htdocs/facture.class.php +++ b/htdocs/facture.class.php @@ -1007,8 +1007,7 @@ class Facture if (! $ventil) $ventil=0; $soc = new Societe($this->db); $soc->fetch($this->socidp); - if($soc->tva_assuj == "0") - $txtva ="0"; + if($soc->tva_assuj == "0") $txtva ="0"; dolibarr_syslog("facture.class.php:: txtva : ".$txtva); if ($fk_product && ! $pu) { @@ -1059,14 +1058,14 @@ class Facture $rangmax = $row[0]; } - if ($conf->global->PRODUIT_CHANGE_PROD_DESC) - { - if (!$product_desc) - { - $product_desc = $desc; - } - } - + if ($conf->global->PRODUIT_CHANGE_PROD_DESC) + { + if (!$product_desc) + { + $product_desc = $desc; + } + } + // Formatage des prix $price = price2num($price); $subprice = price2num($subprice); diff --git a/htdocs/product.class.php b/htdocs/product.class.php index 73f77ae0706..37de0243aba 100644 --- a/htdocs/product.class.php +++ b/htdocs/product.class.php @@ -208,9 +208,9 @@ class Product if (! $this->libelle) $this->libelle = 'LIBELLE MANQUANT'; $this->ref = trim(sanitize_string($this->ref)); - $this->libelle = trim(addslashes($this->libelle)); - $this->description = trim(addslashes($this->description)); - $this->note = trim(addslashes($this->note)); + $this->libelle = trim($this->libelle); + $this->description = trim($this->description); + $this->note = trim($this->note); $sql = "UPDATE ".MAIN_DB_PREFIX."product "; $sql .= " SET label = '" . addslashes($this->libelle) ."'";