Skip to content

Commit

Permalink
[K6.3] Remove two parts deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
xillibit committed Oct 24, 2023
1 parent 1c4ddb7 commit 06ab986
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected function loadApplication(): CMSApplicationInterface
*/
protected function loadInput(): Input
{
return $this->app->input;
return $this->app->getInput();
}

/**
Expand Down
11 changes: 10 additions & 1 deletion src/libraries/kunena/src/Database/KunenaDatabaseObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Table\Table;
use Joomla\Database\DatabaseInterface;
use Kunena\Forum\Libraries\Exception\KunenaException;

/**
Expand Down Expand Up @@ -166,7 +167,15 @@ public function load($id = null): bool
*/
protected function getTable()
{
$table = Table::getInstance($this->_table, 'Kunena\Forum\Libraries\Tables\Table');
$className = 'Kunena\Forum\Libraries\Tables\\' . $this->_table;
$db = Factory::getContainer()->get(DatabaseInterface::class);

if (class_exists($className)) {
$table = new $className($db);
} else {
$className = 'Kunena\Forum\Libraries\Tables\Table' . $this->_table;
$table = new $className($db);
}

return $table;
}
Expand Down

0 comments on commit 06ab986

Please sign in to comment.