From fbfe491903ecb21a30285e131b5083e1234d8243 Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Mon, 12 Sep 2011 09:15:50 +0000 Subject: [PATCH] [-] Controller : fixed sql bug in contact controller git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8484 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/ContactController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controllers/ContactController.php b/controllers/ContactController.php index 6631a7462..3ad04c7af 100644 --- a/controllers/ContactController.php +++ b/controllers/ContactController.php @@ -140,8 +140,9 @@ class ContactControllerCore extends FrontController } $old_message = Db::getInstance()->getValue(' SELECT cm.message FROM '._DB_PREFIX_.'customer_message cm - WHERE cm.id_customer_thread = '.(int)($id_customer_thread).'AND cm.id_shop = '.(int)$this->id_current_shop.' - ORDER BY date_add DESC'); + LEFT JOIN '._DB_PREFIX_.'customer_thread cc on (cm.id_customer_thread = cc.id_customer_thread) + WHERE cc.id_customer_thread = '.(int)($id_customer_thread).' AND cc.id_shop = '.(int)$this->id_current_shop.' + ORDER BY cm.date_add DESC'); if ($old_message == htmlentities($message, ENT_COMPAT, 'UTF-8')) { $this->context->smarty->assign('alreadySent', 1);