]> git.mxchange.org Git - friendica.git/commitdiff
Refactor dynamic App::getDBA() to static DI::dba()
authornupplaPhil <admin@philipp.info>
Sun, 15 Dec 2019 22:52:47 +0000 (23:52 +0100)
committernupplaPhil <admin@philipp.info>
Sun, 29 Dec 2019 19:17:43 +0000 (20:17 +0100)
src/App.php
src/Module/Install.php

index c0787a460ec8c73b74c99f02c146a99ca654408c..c0c38785387b516b9839bb046ccaaebcee2770e1 100644 (file)
@@ -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()
index 29fbdacbc08095eab7c7873c988b8e9a815c0851..228f4be44af8e4687b0a29cda18e3507c9a0b28c 100644 (file)
@@ -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;
                                }