Skip to content

Commit

Permalink
Replace Factory::getDbo() with $this->getDbo()
Browse files Browse the repository at this point in the history
  • Loading branch information
joomdonation committed Jul 29, 2021
1 parent 64569b5 commit 026534e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected function loadFormData()
*/
public function getTotal()
{
$db = Factory::getDbo();
$db = $this->getDbo();
$query = $db->getQuery(true)
->select('MAX(link_id)')
->from('#__finder_links');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ public function finaliseUpgrade()
$installer->setUpgrade(true);
$installer->setOverwrite(true);

$installer->extension = new \Joomla\CMS\Table\Extension(Factory::getDbo());
$installer->extension = new \Joomla\CMS\Table\Extension($this->getDbo());
$installer->extension->load(ExtensionHelper::getExtensionRecord('joomla', 'file')->extension_id);

$installer->setAdapter($installer->extension->type);
Expand Down Expand Up @@ -713,7 +713,7 @@ public function finaliseUpgrade()
}

$id = $db->loadResult();
$row = new \Joomla\CMS\Table\Extension(Factory::getDbo());
$row = new \Joomla\CMS\Table\Extension($this->getDbo());

if ($id)
{
Expand Down Expand Up @@ -806,7 +806,7 @@ public function finaliseUpgrade()
ob_end_clean();

// Clobber any possible pending updates.
$update = new \Joomla\CMS\Table\Update(Factory::getDbo());
$update = new \Joomla\CMS\Table\Update($this->getDbo());
$uid = $update->find(
array('element' => 'joomla', 'type' => 'file', 'client_id' => '0', 'folder' => '')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public function delete($cids)
*/
public function purge()
{
$db = Factory::getDbo();
$db = $this->getDbo();

// Note: TRUNCATE is a DDL operation
// This may or may not mean depending on your database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ protected function storeFileInfo($path, $name, $template)
public function getTemplateList()
{
// Get a db connection.
$db = Factory::getDbo();
$db = $this->getDbo();

// Create a new query object.
$query = $db->getQuery(true);
Expand Down Expand Up @@ -154,7 +154,7 @@ public function getTemplateList()
public function getUpdatedList($state = false, $all = false, $cleanup = false)
{
// Get a db connection.
$db = Factory::getDbo();
$db = $this->getDbo();

// Create a new query object.
$query = $db->getQuery(true);
Expand Down Expand Up @@ -318,7 +318,7 @@ public function prepareCoreFiles($dir, $element, $template)
*/
public function publish($ids, $value, $exid)
{
$db = Factory::getDbo();
$db = $this->getDbo();

foreach ($ids as $id)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function getItems()
*/
public function updated($exid)
{
$db = Factory::getDbo();
$db = $this->getDbo();

// Select the required fields from the table
$query = $db->getQuery(true)
Expand Down

0 comments on commit 026534e

Please sign in to comment.