diff options
Diffstat (limited to 'lib/lib_install.php')
| -rw-r--r-- | lib/lib_install.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/lib_install.php b/lib/lib_install.php index 720c4bf77..f36d2eaa6 100644 --- a/lib/lib_install.php +++ b/lib/lib_install.php @@ -77,13 +77,12 @@ function generateSalt(): string { } function initDb(): string { - $conf = FreshRSS_Context::$system_conf; - $db = $conf->db; + $db = FreshRSS_Context::systemConf()->db; if (empty($db['pdo_options'])) { $db['pdo_options'] = []; } $db['pdo_options'][PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION; - $conf->db = $db; //TODO: Remove this Minz limitation "Indirect modification of overloaded property" + FreshRSS_Context::systemConf()->db = $db; //TODO: Remove this Minz limitation "Indirect modification of overloaded property" if (empty($db['type'])) { $db['type'] = 'sqlite'; @@ -95,7 +94,7 @@ function initDb(): string { $dbBase = $db['base'] ?? ''; //For first connection, use default database for PostgreSQL, empty database for MySQL / MariaDB: $db['base'] = $db['type'] === 'pgsql' ? 'postgres' : ''; - $conf->db = $db; + FreshRSS_Context::systemConf()->db = $db; try { //First connection without database name to create the database $databaseDAO = FreshRSS_Factory::createDatabaseDAO(); @@ -104,7 +103,7 @@ function initDb(): string { } //Restore final database parameters for auto-creation and for future connections $db['base'] = $dbBase; - $conf->db = $db; + FreshRSS_Context::systemConf()->db = $db; if ($databaseDAO != null) { //Perform database auto-creation $databaseDAO->create(); |
