From cc9b7bb14f14953baa7ffb6575ac92e086c9a40f Mon Sep 17 00:00:00 2001 From: nupplaPhil Date: Sun, 15 Dec 2019 23:52:47 +0100 Subject: [PATCH] Refactor dynamic App::getDBA() to static DI::dba() --- src/App.php | 10 ---------- src/Module/Install.php | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/App.php b/src/App.php index c0787a460e..c0c3878538 100644 --- a/src/App.php +++ b/src/App.php @@ -155,16 +155,6 @@ class App return $this->config->getCache()->get('system', 'basepath'); } - /** - * Returns the Database of the Application - * - * @return Database - */ - public function getDBA() - { - return $this->database; - } - /** * @deprecated 2019.09 - use Page->registerStylesheet instead * @see Page::registerStylesheet() diff --git a/src/Module/Install.php b/src/Module/Install.php index 29fbdacbc0..228f4be44a 100644 --- a/src/Module/Install.php +++ b/src/Module/Install.php @@ -111,7 +111,7 @@ class Install extends BaseModule self::checkSetting($configCache, $_POST, 'database', 'database', ''); // If we cannot connect to the database, return to the previous step - if (!self::$installer->checkDB($a->getDBA())) { + if (!self::$installer->checkDB(DI::dba())) { self::$currentWizardStep = self::DATABASE_CONFIG; } @@ -135,7 +135,7 @@ class Install extends BaseModule self::checkSetting($configCache, $_POST, 'config', 'admin_email', ''); // If we cannot connect to the database, return to the Database config wizard - if (!self::$installer->checkDB($a->getDBA())) { + if (!self::$installer->checkDB(DI::dba())) { self::$currentWizardStep = self::DATABASE_CONFIG; return; }