[-] 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:
@@ -140,8 +140,9 @@ class ContactControllerCore extends FrontController
|
|||||||
}
|
}
|
||||||
$old_message = Db::getInstance()->getValue('
|
$old_message = Db::getInstance()->getValue('
|
||||||
SELECT cm.message FROM '._DB_PREFIX_.'customer_message cm
|
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.'
|
LEFT JOIN '._DB_PREFIX_.'customer_thread cc on (cm.id_customer_thread = cc.id_customer_thread)
|
||||||
ORDER BY date_add DESC');
|
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'))
|
if ($old_message == htmlentities($message, ENT_COMPAT, 'UTF-8'))
|
||||||
{
|
{
|
||||||
$this->context->smarty->assign('alreadySent', 1);
|
$this->context->smarty->assign('alreadySent', 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user