[-] BO : fixed bug in contact message with html

This commit is contained in:
vAugagneur
2012-02-28 11:05:21 +00:00
parent 46eb7645df
commit e061e9a49c
7 changed files with 140 additions and 43 deletions
+7 -6
View File
@@ -86,7 +86,7 @@ class OrderDetailControllerCore extends FrontController
else
$ct = new CustomerThread((int)$id_customer_thread);
$cm->id_customer_thread = $ct->id;
$cm->message = Tools::htmlentitiesutf8(Tools::nl2br($msgText));
$cm->message = Tools::htmlentitiesutf8($msgText);
$cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']);
$cm->add();
@@ -103,11 +103,12 @@ class OrderDetailControllerCore extends FrontController
if (Validate::isLoadedObject($customer))
Mail::Send($this->context->language->id, 'order_customer_comment', Mail::l('Message from a customer'),
array(
'{lastname}' => $customer->lastname,
'{firstname}' => $customer->firstname,
'{email}' => $customer->email,
'{id_order}' => (int)($order->id),
'{message}' => $msgText),
'{lastname}' => $customer->lastname,
'{firstname}' => $customer->firstname,
'{email}' => $customer->email,
'{id_order}' => (int)($order->id),
'{message}' => Tools::nl2br($msgText)
),
$to, $toName, $customer->email, $customer->firstname.' '.$customer->lastname);
if (Tools::getValue('ajax') != 'true')