Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into bootstrap
Conflicts: admin-dev/themes/default/css/modules.css admin-dev/themes/default/template/controllers/carts/helpers/view/view.tpl admin-dev/themes/default/template/controllers/groups/helpers/form/form.tpl admin-dev/themes/default/template/controllers/groups/helpers/view/view.tpl admin-dev/themes/default/template/controllers/products/helpers/form/form.tpl admin-dev/themes/default/template/controllers/products/images.tpl admin-dev/themes/default/template/controllers/products/prices.tpl admin-dev/themes/default/template/helpers/form/form.tpl admin-dev/themes/default/template/helpers/list/list_header.tpl classes/Autoload.php classes/Carrier.php classes/Product.php classes/ProductSale.php classes/Tools.php classes/Validate.php classes/tax/TaxRulesTaxManager.php controllers/admin/AdminPPreferencesController.php controllers/admin/AdminPerformanceController.php install-dev/install_version.php js/admin_carrier_wizard.js modules/blockcategories/blockcategories.php modules/blocklayered/blocklayered.php modules/statsequipment/statsequipment.php modules/statsproduct/statsproduct.php modules/watermark/watermark.php themes/default/address.tpl themes/default/authentication.tpl themes/default/category.tpl themes/default/contact-form.tpl themes/default/css/history.css themes/default/header.tpl themes/default/js/cart-summary.js themes/default/js/product.js themes/default/mobile/order-detail.tpl themes/default/modules/blocksearch/blocksearch.tpl themes/default/modules/productcomments/productcomments.tpl themes/default/order-carrier.tpl themes/default/order-detail.tpl themes/default/order-opc-new-account.tpl themes/default/product.tpl
This commit is contained in:
@@ -309,12 +309,15 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
$cm = new CustomerMessage();
|
||||
$cm->id_employee = (int)$this->context->employee->id;
|
||||
$cm->id_customer_thread = (int)Tools::getValue('id_customer_thread');
|
||||
$cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']);
|
||||
$cm->ip_address = ip2long(Tools::getRemoteAddr());
|
||||
$current_employee = $this->context->employee;
|
||||
$id_employee = (int)Tools::getValue('id_employee_forward');
|
||||
$employee = new Employee($id_employee);
|
||||
$email = Tools::getValue('email');
|
||||
if ($id_employee && $employee && Validate::isLoadedObject($employee))
|
||||
$message = Tools::getValue('message_forward');
|
||||
if (($error = $cm->validateField('message', $message, null, array(), true)) !== true)
|
||||
$this->errors[] = $error;
|
||||
elseif ($id_employee && $employee && Validate::isLoadedObject($employee))
|
||||
{
|
||||
$params = array(
|
||||
'{messages}' => Tools::nl2br(stripslashes($output)),
|
||||
@@ -333,7 +336,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
null, null, _PS_MAIL_DIR_, true))
|
||||
{
|
||||
$cm->private = 1;
|
||||
$cm->message = $this->l('Message forwarded to').' '.$employee->firstname.' '.$employee->lastname."\n".$this->l('Comment:').' '.$_POST['message_forward'];
|
||||
$cm->message = $this->l('Message forwarded to').' '.$employee->firstname.' '.$employee->lastname."\n".$this->l('Comment:').' '.$message;
|
||||
$cm->add();
|
||||
}
|
||||
}
|
||||
@@ -352,7 +355,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
$current_employee->email, $current_employee->firstname.' '.$current_employee->lastname,
|
||||
null, null, _PS_MAIL_DIR_, true))
|
||||
{
|
||||
$cm->message = $this->l('Message forwarded to').' '.$email."\n".$this->l('Comment:').' '.$_POST['message_forward'];
|
||||
$cm->message = $this->l('Message forwarded to').' '.$email."\n".$this->l('Comment:').' '.$message;
|
||||
$cm->add();
|
||||
}
|
||||
}
|
||||
@@ -368,10 +371,11 @@ class AdminCustomerThreadsControllerCore extends AdminController
|
||||
$cm = new CustomerMessage();
|
||||
$cm->id_employee = (int)$this->context->employee->id;
|
||||
$cm->id_customer_thread = $ct->id;
|
||||
|
||||
$cm->ip_address = ip2long(Tools::getRemoteAddr());
|
||||
$cm->message = Tools::getValue('reply_message');
|
||||
$cm->ip_address = ip2long($_SERVER['REMOTE_ADDR']);
|
||||
if (isset($_FILES) && !empty($_FILES['joinFile']['name']) && $_FILES['joinFile']['error'] != 0)
|
||||
if (($error = $cm->validateField('message', $cm->message, null, array(), true)) !== true)
|
||||
$this->errors[] = $error;
|
||||
elseif (isset($_FILES) && !empty($_FILES['joinFile']['name']) && $_FILES['joinFile']['error'] != 0)
|
||||
$this->errors[] = Tools::displayError('An error occurred during the file upload process.');
|
||||
elseif ($cm->add())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user