From 9e4a66b1a9c53863d1ffdf2c507184dcbee5b264 Mon Sep 17 00:00:00 2001 From: fappels Date: Thu, 22 Mar 2018 10:46:54 +0100 Subject: [PATCH 1/2] Fix hidden oprion PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION --- htdocs/product/class/product.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index ec831b91458..e36d5970e8f 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1225,7 +1225,7 @@ class Product extends CommonObject $sql2.= " SET "; $sql2.= " label='".$this->db->escape($this->label)."',"; $sql2.= " description='".$this->db->escape($this->description)."'"; - if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", note='".$this->db->escape($this->note)."'"; + if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", note='".$this->db->escape($this->other)."'"; $sql2.= " WHERE fk_product=".$this->id." AND lang='".$this->db->escape($key)."'"; } else @@ -1235,7 +1235,7 @@ class Product extends CommonObject $sql2.= ")"; $sql2.= " VALUES(".$this->id.",'".$this->db->escape($key)."','". $this->db->escape($this->label)."',"; $sql2.= " '".$this->db->escape($this->description)."'"; - if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", '".$this->db->escape($this->note)."'"; + if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", '".$this->db->escape($this->other)."'"; $sql2.= ")"; } dol_syslog(get_class($this).'::setMultiLangs key = current_lang = '.$key); @@ -1260,7 +1260,7 @@ class Product extends CommonObject $sql2.= " SET "; $sql2.= " label='".$this->db->escape($this->multilangs["$key"]["label"])."',"; $sql2.= " description='".$this->db->escape($this->multilangs["$key"]["description"])."'"; - if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", note='".$this->db->escape($this->multilangs["$key"]["note"])."'"; + if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", note='".$this->db->escape($this->multilangs["$key"]["other"])."'"; $sql2.= " WHERE fk_product=".$this->id." AND lang='".$this->db->escape($key)."'"; } else @@ -1270,7 +1270,7 @@ class Product extends CommonObject $sql2.= ")"; $sql2.= " VALUES(".$this->id.",'".$this->db->escape($key)."','". $this->db->escape($this->multilangs["$key"]["label"])."',"; $sql2.= " '".$this->db->escape($this->multilangs["$key"]["description"])."'"; - if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", '".$this->db->escape($this->note)."'"; + if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) $sql2.= ", '".$this->db->escape($this->multilangs["$key"]["other"])."'"; $sql2.= ")"; } From 3765bc4775b4dc5a1d4397ae644d210ec514b1e2 Mon Sep 17 00:00:00 2001 From: fappels Date: Thu, 22 Mar 2018 10:48:03 +0100 Subject: [PATCH 2/2] Fix html escape for edit label --- htdocs/product/traduction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index fd13aee1ea2..d0740f7cd71 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -251,7 +251,7 @@ if ($action == 'edit') print '
'; print ''; - print ''; + print ''; print '
'.$langs->trans('Label').'
'.$langs->trans('Label').'
'.$langs->trans('Description').''; $doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); $doleditor->Create();