From 240d8486a217b2852de0ada139f5054a0da64ce1 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 8 Jun 2009 10:56:54 +0000 Subject: [PATCH] Fix: no accent Fix: error if no product translation --- htdocs/html.form.class.php | 32 ++++---- htdocs/lib/databases/mysql.lib.php | 16 ++-- htdocs/lib/databases/mysqli.lib.php | 2 +- htdocs/product.class.php | 112 ++++++++++++++-------------- htdocs/propal.class.php | 12 +-- 5 files changed, 88 insertions(+), 86 deletions(-) diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index bbf5340009a..78cd3768305 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -823,7 +823,6 @@ class Form dol_syslog("Form::select_produits_do sql=".$sql, LOG_DEBUG); $resultd = $this->db->query($sqld); - if ( $resultd ) $objtp = $this->db->fetch_object($resultd); } if ($result) @@ -859,10 +858,10 @@ class Form // Multilangs : modification des donnée si une traduction existe if ($conf->global->MAIN_MULTILANGS) { + if ( $resultd ) $objtp = $this->db->fetch_object($resultd); if ( $objp->rowid == $objtp->fk_product ) // si on a une traduction { if ( $objtp->label != '') $objp->label = $objtp->label; - if ( $resultd ) $objtp = $this->db->fetch_object($resultd); // on charge la traduction suivante } } $opt = '