Skip to content

Commit

Permalink
Update JsonView.php
Browse files Browse the repository at this point in the history
  • Loading branch information
conseilgouz committed Mar 13, 2024
1 parent 2968102 commit ae489f6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/com_cgsecure/admin/src/View/Config/JsonView.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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;

}
}

0 comments on commit ae489f6

Please sign in to comment.