From 77e06014f44d0688f38b0da327ae4899e3030178 Mon Sep 17 00:00:00 2001 From: Andre Cianfarani Date: Wed, 15 Mar 2006 15:39:50 +0000 Subject: [PATCH] debug --- htdocs/categories/categorie.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/categories/categorie.class.php b/htdocs/categories/categorie.class.php index 0e5c9c46360..56dc24c2941 100644 --- a/htdocs/categories/categorie.class.php +++ b/htdocs/categories/categorie.class.php @@ -111,7 +111,7 @@ class Categorie } $sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie (label, description) "; - $sql .= "VALUES ('".str_replace("'","''",$this->label)."', '".$this->description."')"; + $sql .= "VALUES ('".str_replace("'","''",$this->label)."', '".str_replace("'","''",$this->description)."')"; $res = $this->db->query ($sql); @@ -172,10 +172,10 @@ class Categorie } } $sql = "UPDATE ".MAIN_DB_PREFIX."categorie"; - $sql.= " SET label = '".trim($this->label)."'"; + $sql.= " SET label = '".trim(str_replace("'","''",$this->label))."'"; if (strlen (trim($this->description)) > 0) - $sql .= ", description = '".trim($this->description)."'"; + $sql .= ", description = '".trim(str_replace("'","''",$this->description))."'"; $sql .= " WHERE rowid = ".$this->id; if ($this->db->query($sql))