From 4877ff5dc85c2b9eb966e15100b305eb4c8f9c25 Mon Sep 17 00:00:00 2001 From: lakshya chauhan Date: Fri, 1 Apr 2022 15:34:11 +0530 Subject: [PATCH] resolved --- controllers/admin/AdminCustomerThreadsController.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/controllers/admin/AdminCustomerThreadsController.php b/controllers/admin/AdminCustomerThreadsController.php index fa01f8cbc..0da643adf 100644 --- a/controllers/admin/AdminCustomerThreadsController.php +++ b/controllers/admin/AdminCustomerThreadsController.php @@ -458,7 +458,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(); } @@ -560,7 +560,6 @@ class AdminCustomerThreadsControllerCore extends AdminController return; } - $this->context = Context::getContext(); if (!($thread = $this->loadObject())) { return; } @@ -800,7 +799,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, @@ -808,7 +807,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 ));