diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index fe66af1b39d..b4124e84fc8 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -2613,7 +2613,7 @@ abstract class CommonObject
$outputlangs->setDefaultLang($newlang);
}
- $label = (! empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $line->product_label;
+ $label = (! empty($prod->multilangs[$outputlangs->defaultlang]["label"])) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $line->product_label;
}
else
{
diff --git a/htdocs/core/lib/doc.lib.php b/htdocs/core/lib/doc.lib.php
index a96a08f93b2..d6da55569ca 100644
--- a/htdocs/core/lib/doc.lib.php
+++ b/htdocs/core/lib/doc.lib.php
@@ -57,7 +57,7 @@ function doc_getlinedesc($line,$outputlangs,$hideref=0,$hidedesc=0,$issupplierli
// If a predefined product and multilang and on other lang, we renamed label with label translated
if ($conf->global->MAIN_MULTILANGS && ($outputlangs->defaultlang != $langs->defaultlang))
{
- if (! empty($prodser->multilangs[$outputlangs->defaultlang]["libelle"]) && $label == $prodser->label) $label=$prodser->multilangs[$outputlangs->defaultlang]["libelle"];
+ if (! empty($prodser->multilangs[$outputlangs->defaultlang]["label"]) && $label == $prodser->label) $label=$prodser->multilangs[$outputlangs->defaultlang]["label"];
if (! empty($prodser->multilangs[$outputlangs->defaultlang]["description"]) && $desc == $prodser->description) $desc=$prodser->multilangs[$outputlangs->defaultlang]["description"];
if (! empty($prodser->multilangs[$outputlangs->defaultlang]["note"]) && $note == $prodser->note) $note=$prodser->multilangs[$outputlangs->defaultlang]["note"];
}
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index c98c2be380c..33bc91637a3 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -813,7 +813,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
global $db, $conf, $langs;
$idprod=(! empty($object->lines[$i]->fk_product)?$object->lines[$i]->fk_product:false);
- $label=(! empty($object->lines[$i]->label)?$object->lines[$i]->label:(! empty($object->lines[$i]->libelle)?$object->lines[$i]->libelle:''));
+ $label=(! empty($object->lines[$i]->label)?$object->lines[$i]->label:(! empty($object->lines[$i]->product_label)?$object->lines[$i]->product_label:''));
$desc=(! empty($object->lines[$i]->desc)?$object->lines[$i]->desc:(! empty($object->lines[$i]->description)?$object->lines[$i]->description:''));
$ref_supplier=(! empty($object->lines[$i]->ref_supplier)?$object->lines[$i]->ref_supplier:(! empty($object->lines[$i]->ref_fourn)?$object->lines[$i]->ref_fourn:'')); // TODO Not yet saved for supplier invoices, only supplier orders
$note=(! empty($object->lines[$i]->note)?$object->lines[$i]->note:'');
@@ -825,9 +825,9 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
{
$prodser->fetch($idprod);
// If a predefined product and multilang and on other lang, we renamed label with label translated
- if ($conf->global->MAIN_MULTILANGS && ($outputlangs->defaultlang != $langs->defaultlang))
+ if (! empty($conf->global->MAIN_MULTILANGS) && ($outputlangs->defaultlang != $langs->defaultlang))
{
- if (! empty($prodser->multilangs[$outputlangs->defaultlang]["libelle"]) && $label == $prodser->label) $label=$prodser->multilangs[$outputlangs->defaultlang]["libelle"];
+ if (! empty($prodser->multilangs[$outputlangs->defaultlang]["label"]) && $label == $prodser->label) $label=$prodser->multilangs[$outputlangs->defaultlang]["label"];
if (! empty($prodser->multilangs[$outputlangs->defaultlang]["description"]) && $desc == $prodser->description) $desc=$prodser->multilangs[$outputlangs->defaultlang]["description"];
if (! empty($prodser->multilangs[$outputlangs->defaultlang]["note"]) && $note == $prodser->note) $note=$prodser->multilangs[$outputlangs->defaultlang]["note"];
}
@@ -837,7 +837,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
$libelleproduitservice=$label;
// Description long of product line
- if ($desc && ($desc != $label))
+ if (! empty($desc) && ($desc != $label))
{
if ($libelleproduitservice && empty($hidedesc))
{
diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php
index f4f65b1be04..1bb913792a0 100644
--- a/htdocs/core/lib/sendings.lib.php
+++ b/htdocs/core/lib/sendings.lib.php
@@ -204,7 +204,7 @@ function show_list_sending_receive($origin,$origin_id,$filter='')
$outputlangs->setDefaultLang($newlang);
}
- $label = (! empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $objp->product;
+ $label = (! empty($prod->multilangs[$outputlangs->defaultlang]["label"])) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $objp->product;
}
else
{
diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php
index 4b34720e043..f2b5f7ff772 100644
--- a/htdocs/expedition/fiche.php
+++ b/htdocs/expedition/fiche.php
@@ -1202,7 +1202,7 @@ else
{
$prod = new Product($db);
$prod->fetch($lines[$i]->fk_product);
- $label = ( ! empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $lines[$i]->product_label;
+ $label = ( ! empty($prod->multilangs[$outputlangs->defaultlang]["label"])) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $lines[$i]->product_label;
}
else
$label = $lines[$i]->product_label;
diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php
index f9b5d80fe62..92c85effc06 100644
--- a/htdocs/expedition/shipment.php
+++ b/htdocs/expedition/shipment.php
@@ -420,7 +420,7 @@ if ($id > 0 || ! empty($ref))
$outputlangs->setDefaultLang($newlang);
}
- $label = (! empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $objp->product_label;
+ $label = (! empty($prod->multilangs[$outputlangs->defaultlang]["label"])) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $objp->product_label;
}
else
$label = $objp->product_label;
diff --git a/htdocs/livraison/fiche.php b/htdocs/livraison/fiche.php
index b0b949a4ed0..f3432efdf1c 100644
--- a/htdocs/livraison/fiche.php
+++ b/htdocs/livraison/fiche.php
@@ -343,7 +343,7 @@ if ($_GET["action"] == 'create')
$outputlangs->setDefaultLang($newlang);
}
- $label = (! empty($product->multilangs[$outputlangs->defaultlang]["libelle"])) ? $product->multilangs[$outputlangs->defaultlang]["libelle"] : $product->libelle;
+ $label = (! empty($product->multilangs[$outputlangs->defaultlang]["label"])) ? $product->multilangs[$outputlangs->defaultlang]["label"] : $product->libelle;
}
else
$label = $product->libelle;
@@ -584,7 +584,7 @@ else
$outputlangs->setDefaultLang($newlang);
}
- $label = (! empty($product->multilangs[$outputlangs->defaultlang]["libelle"])) ? $product->multilangs[$outputlangs->defaultlang]["libelle"] : $delivery->lines[$i]->product_label;
+ $label = (! empty($product->multilangs[$outputlangs->defaultlang]["label"])) ? $product->multilangs[$outputlangs->defaultlang]["label"] : $delivery->lines[$i]->product_label;
}
else
$label = $delivery->lines[$i]->product_label;
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 9129c111248..bd31d6df7ab 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -705,7 +705,7 @@ class Product extends CommonObject
if ($this->db->num_rows($result)) // si aucune ligne dans la base
{
$sql2 = "UPDATE ".MAIN_DB_PREFIX."product_lang";
- $sql2.= " SET label='".$this->db->escape($this->multilangs["$key"]["libelle"])."',";
+ $sql2.= " SET label='".$this->db->escape($this->multilangs["$key"]["label"])."',";
$sql2.= " description='".$this->db->escape($this->multilangs["$key"]["description"])."',";
$sql2.= " note='".$this->db->escape($this->multilangs["$key"]["note"])."'";
$sql2.= " WHERE fk_product=".$this->id." AND lang='".$key."'";
@@ -713,13 +713,13 @@ class Product extends CommonObject
else
{
$sql2 = "INSERT INTO ".MAIN_DB_PREFIX."product_lang (fk_product, lang, label, description, note)";
- $sql2.= " VALUES(".$this->id.",'".$key."','". $this->db->escape($this->multilangs["$key"]["libelle"]);
+ $sql2.= " VALUES(".$this->id.",'".$key."','". $this->db->escape($this->multilangs["$key"]["label"]);
$sql2.= "','".$this->db->escape($this->multilangs["$key"]["description"]);
$sql2.= "','".$this->db->escape($this->multilangs["$key"]["note"])."')";
}
// on ne sauvegarde pas des champs vides
- if ( $this->multilangs["$key"]["libelle"] || $this->multilangs["$key"]["description"] || $this->multilangs["$key"]["note"] )
+ if ( $this->multilangs["$key"]["label"] || $this->multilangs["$key"]["description"] || $this->multilangs["$key"]["note"] )
if (!$this->db->query($sql2)) return -1;
}
}
@@ -750,12 +750,12 @@ class Product extends CommonObject
//print 'lang='.$obj->lang.' current='.$current_lang.'
';
if( $obj->lang == $current_lang ) // si on a les traduct. dans la langue courante on les charge en infos principales.
{
- $this->libelle = $obj->label;
+ $this->label = $obj->label;
$this->description = $obj->description;
$this->note = $obj->note;
}
- $this->multilangs["$obj->lang"]["libelle"] = $obj->label;
+ $this->multilangs["$obj->lang"]["label"] = $obj->label;
$this->multilangs["$obj->lang"]["description"] = $obj->description;
$this->multilangs["$obj->lang"]["note"] = $obj->note;
}
diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php
index ac85a450231..b856a057a91 100644
--- a/htdocs/product/traduction.php
+++ b/htdocs/product/traduction.php
@@ -67,15 +67,15 @@ $cancel != $langs->trans("Cancel") &&
// update de l'objet
if ( $_POST["forcelangprod"] == $current_lang )
{
- $product->libelle = $_POST["libelle"];
+ $product->label = $_POST["libelle"];
$product->description = dol_htmlcleanlastbr($_POST["desc"]);
$product->note = dol_htmlcleanlastbr($_POST["note"]);
}
else
{
- $product->multilangs[$_POST["forcelangprod"]]["libelle"] = $_POST["libelle"];
+ $product->multilangs[$_POST["forcelangprod"]]["label"] = $_POST["libelle"];
$product->multilangs[$_POST["forcelangprod"]]["description"] = dol_htmlcleanlastbr($_POST["desc"]);
- $product->multilangs[$_POST["forcelangprod"]]["note"] = dol_htmlcleanlastbr($_POST["note"]);
+ $product->multilangs[$_POST["forcelangprod"]]["note"] = dol_htmlcleanlastbr($_POST["note"]);
}
// sauvegarde en base
@@ -103,13 +103,13 @@ $cancel != $langs->trans("Cancel") &&
{
if ( $key == $current_lang )
{
- $product->libelle = $_POST["libelle-".$key];
+ $product->lable = $_POST["libelle-".$key];
$product->description = dol_htmlcleanlastbr($_POST["desc-".$key]);
$product->note = dol_htmlcleanlastbr($_POST["note-".$key]);
}
else
{
- $product->multilangs[$key]["libelle"] = $_POST["libelle-".$key];
+ $product->multilangs[$key]["label"] = $_POST["libelle-".$key];
$product->multilangs[$key]["description"] = dol_htmlcleanlastbr($_POST["desc-".$key]);
$product->multilangs[$key]["note"] = dol_htmlcleanlastbr($_POST["note-".$key]);
}
@@ -174,15 +174,15 @@ if ($action == 'edit')
{
print "
".$langs->trans('Language_'.$key)." :
";
print '
| '.$langs->trans('Label').' | |||||||||
| '.$langs->trans('Label').' | |||||||||
| '.$langs->trans('Description').' | '; - + $doleditor = new DolEditor("desc-$key", $product->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 3, 80); $doleditor->Create(); print ' | ||||||||
| '.$langs->trans('Note').' | ';
-
+
$doleditor = new DolEditor("note-$key", $product->multilangs[$key]["note"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 3, 80);
$doleditor->Create();
@@ -210,7 +210,7 @@ else
$s=picto_from_langcode($key);
print " ".($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": "; print '
| ||||||||
| '.$langs->trans('Label').' | |||||||||
| '.$langs->trans('Description').' | '; - + $doleditor = new DolEditor('desc', '', '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 3, 80); $doleditor->Create(); print ' | ||||||||
| '.$langs->trans('Note').' | '; - + $doleditor = new DolEditor('note', '', '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 3, 80); $doleditor->Create(); - + print ' |