/[dolibarr]/dolibarr/htdocs/product.class.php
ViewVC logotype

Diff of /dolibarr/htdocs/product.class.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.57 by eldy, Sun Sep 11 17:22:04 2005 UTC revision 1.58 by eldy, Sun Sep 11 17:31:10 2005 UTC
# Line 128  class Product Line 128  class Product
128              {              {
129                  // Produit non deja existant                  // Produit non deja existant
130                  $sql = "INSERT INTO ".MAIN_DB_PREFIX."product ";                  $sql = "INSERT INTO ".MAIN_DB_PREFIX."product ";
131                  $sql .= " (datec, ref, fk_user_author, fk_product_type, price)";                  $sql.= " (datec, ";
132                  $sql .= " VALUES (now(), '".$this->ref."', ".$user->id.",$this->type, '" . $this->price . "')";                  if ($this->ref) $sql.= "ref, ";
133                    $sql.= "fk_user_author, fk_product_type, price)";
134                    $sql.= " VALUES (now(), ";
135                    if ($this->ref) $sql.= "'".$this->ref."', ";
136                    $sql.= $user->id.", ".$this->type.", '" . $this->price . "')";
137                  $result = $this->db->query($sql);                  $result = $this->db->query($sql);
138                  if ( $result )                  if ( $result )
139                  {                  {
# Line 195  class Product Line 199  class Product
199            
200      if (! $this->libelle) $this->libelle = 'LIBELLE MANQUANT';      if (! $this->libelle) $this->libelle = 'LIBELLE MANQUANT';
201    
202      $this->ref = trim($this->ref);      $this->ref = trim(sanitize_string($this->ref));
     $this->ref = ereg_replace("\"","",$this->ref);  
     $this->ref = ereg_replace("'","",$this->ref);  
   
203      $this->libelle = trim($this->libelle);      $this->libelle = trim($this->libelle);
204      $this->description = trim($this->description);      $this->description = trim($this->description);
205      $this->note = trim($this->note);      $this->note = trim($this->note);

Legend:
Removed from v.1.57  
changed lines
  Added in v.1.58

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26