fix(database): fix db connection error when not standard mysql port

This commit is contained in:
2025-09-24 14:37:18 +03:00
parent 9e4022f648
commit ec5cdfcaa9
2 changed files with 10 additions and 1 deletions

View File

@@ -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) {

View File

@@ -75,6 +75,7 @@ class ControllerExtensionTgshopHandle extends Controller
'username' => DB_USERNAME,
'password' => DB_PASSWORD,
'prefix' => DB_PREFIX,
'port' => DB_PORT,
],
'logs' => [
'path' => DIR_LOGS,