Merge pull request #340 from lakshya-webkul/gli-customer-service-issue

Resolved a fatal error when forwarding a discussion to another employee on the Customer Service page.
This commit is contained in:
Rohit Jain
2022-09-23 14:33:48 +05:30
committed by GitHub

View File

@@ -459,7 +459,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
public function initContent()
{
if (isset($_GET['filename']) && (bool)Tools::file_get_contents($context->link->getMediaLink(_THEME_PROD_PIC_DIR_.$_GET['filename'])) && Validate::isFileName($_GET['filename'])) { // by webkul
if (isset($_GET['filename']) && (bool)Tools::file_get_contents($this->context->link->getMediaLink(_THEME_PROD_PIC_DIR_.$_GET['filename'])) && Validate::isFileName($_GET['filename'])) { // by webkul
AdminCustomerThreadsController::openUploadedFile();
}
@@ -561,7 +561,6 @@ class AdminCustomerThreadsControllerCore extends AdminController
return;
}
$this->context = Context::getContext();
if (!($thread = $this->loadObject())) {
return;
}
@@ -801,7 +800,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
'thread_url' => Tools::getAdminUrl(basename(_PS_ADMIN_DIR_).'/'.
$this->context->link->getAdminLink('AdminCustomerThreads').'&id_customer_thread='
.(int)$message['id_customer_thread'].'&viewcustomer_thread=1'),
'link' => Context::getContext()->link,
'link' => $this->context->link,
'current' => self::$currentIndex,
'token' => $this->token,
'message' => $message,
@@ -809,7 +808,7 @@ class AdminCustomerThreadsControllerCore extends AdminController
'email' => $email,
'id_employee' => $id_employee,
'PS_SHOP_NAME' => Configuration::get('PS_SHOP_NAME'),
'file_name' => (bool)Tools::file_get_contents($context->link->getMediaLink(_THEME_PROD_PIC_DIR_.$message['file_name'])), // by webkul
'file_name' => (bool)Tools::file_get_contents($this->context->link->getMediaLink(_THEME_PROD_PIC_DIR_.$message['file_name'])), // by webkul
'contacts' => $contacts,
'is_valid_order_id' => $is_valid_order_id
));