From ae489f66d0ba8b9546b47853085199035ad9a02e Mon Sep 17 00:00:00 2001 From: pmleconte Date: Wed, 13 Mar 2024 18:35:29 +0100 Subject: [PATCH] Update JsonView.php --- .../com_cgsecure/admin/src/View/Config/JsonView.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/com_cgsecure/admin/src/View/Config/JsonView.php b/packages/com_cgsecure/admin/src/View/Config/JsonView.php index bac7f4b..8ab9bea 100644 --- a/packages/com_cgsecure/admin/src/View/Config/JsonView.php +++ b/packages/com_cgsecure/admin/src/View/Config/JsonView.php @@ -16,6 +16,8 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\AbstractView; use Joomla\CMS\Response\JsonResponse; +use Joomla\CMS\Table\Table; +use Joomla\Database\DatabaseInterface; use Exception; /** @@ -405,10 +407,10 @@ private function getServerConfigFilePath($file) } private function getParams() { - $db = Factory::getDBo(); - $table = Table::getInstance('ConfigTable','ConseilGouz\\Component\\CGSecure\Administrator\\Table\\', array('dbo' => $db)); - $params = json_decode($table->getSecureParams()->params); - return $params; + $db = Factory::getContainer()->get(DatabaseInterface::class); + $table = Table::getInstance('ConfigTable', 'ConseilGouz\\Component\\CGSecure\Administrator\\Table\\', array('dbo' => $db)); + $params = json_decode($table->getSecureParams()->params); + return $params; } }