From ec5cdfcaa9321cb824c858df91ce4464d6158a2c Mon Sep 17 00:00:00 2001 From: Nikita Kiselev Date: Wed, 24 Sep 2025 14:37:18 +0300 Subject: [PATCH] fix(database): fix db connection error when not standard mysql port --- .../admin/controller/extension/module/tgshop.php | 10 +++++++++- .../catalog/controller/extension/tgshop/handle.php | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/module/oc_telegram_shop/upload/admin/controller/extension/module/tgshop.php b/module/oc_telegram_shop/upload/admin/controller/extension/module/tgshop.php index f420165..a0894e8 100755 --- a/module/oc_telegram_shop/upload/admin/controller/extension/module/tgshop.php +++ b/module/oc_telegram_shop/upload/admin/controller/extension/module/tgshop.php @@ -210,6 +210,14 @@ class ControllerExtensionModuleTgshop extends Controller 'owner_notification_template' => $this->config->get('module_tgshop_owner_notification_template'), 'customer_notification_template' => $this->config->get('module_tgshop_customer_notification_template'), ], + 'db' => [ + 'host' => DB_HOSTNAME, + 'database' => DB_DATABASE, + 'username' => DB_USERNAME, + 'password' => DB_PASSWORD, + 'prefix' => DB_PREFIX, + 'port' => DB_PORT, + ], 'logs' => [ 'path' => DIR_LOGS, ], @@ -226,7 +234,7 @@ class ControllerExtensionModuleTgshop extends Controller protected function validate(): bool { if (! $this->user->hasPermission('modify', 'extension/module/tgshop')) { - $this->error['error_warning'] = $this->language->get('error_permission'); + $this->error['telecart_error_warning'] = $this->language->get('error_permission'); } foreach ($this->getSettingsConfig() as $configs) { diff --git a/module/oc_telegram_shop/upload/catalog/controller/extension/tgshop/handle.php b/module/oc_telegram_shop/upload/catalog/controller/extension/tgshop/handle.php index 3c70c43..078f2d1 100755 --- a/module/oc_telegram_shop/upload/catalog/controller/extension/tgshop/handle.php +++ b/module/oc_telegram_shop/upload/catalog/controller/extension/tgshop/handle.php @@ -75,6 +75,7 @@ class ControllerExtensionTgshopHandle extends Controller 'username' => DB_USERNAME, 'password' => DB_PASSWORD, 'prefix' => DB_PREFIX, + 'port' => DB_PORT, ], 'logs' => [ 'path' => DIR_LOGS,