[-] 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
This commit is contained in:
vAugagneur
2011-09-12 09:15:50 +00:00
parent a3245e4093
commit fbfe491903
+3 -2
View File
@@ -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);