[-] BO : fixed bug #PSCFV-5774 BO SAV : the response of the admin appears without newline

This commit is contained in:
vAugagneur
2012-12-07 17:22:06 +01:00
parent 7bc49194b7
commit cc7c40d4e9

View File

@@ -370,7 +370,8 @@ class AdminCustomerThreadsControllerCore extends AdminController
$cm = new CustomerMessage();
$cm->id_employee = (int)$this->context->employee->id;
$cm->id_customer_thread = $ct->id;
$cm->message = Tools::nl2br(Tools::htmlentitiesutf8(Tools::getValue('reply_message')));
$cm->message = Tools::htmlentitiesutf8(Tools::getValue('reply_message'));
$cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']);
if (isset($_FILES) && !empty($_FILES['joinFile']['name']) && $_FILES['joinFile']['error'] != 0)
$this->errors[] = Tools::displayError('An error occurred with the file upload.');
@@ -571,7 +572,6 @@ class AdminCustomerThreadsControllerCore extends AdminController
if (!empty($message['id_product']) && empty($message['employee_name']))
$id_order_product = Order::getIdOrderProduct((int)$message['id_customer'], (int)$message['id_product']);
}
$message['date_add'] = Tools::displayDate($message['date_add'], $this->context->language->id, true);
$message['user_agent'] = strip_tags($message['user_agent']);
$message['message'] = preg_replace(