mirror of
https://github.com/friendica/friendica
synced 2025-04-29 10:24:23 +02:00
Refactor ConfigFileManager
This commit is contained in:
parent
cde93c68dc
commit
58e447f7bb
1 changed files with 48 additions and 46 deletions
|
@ -245,7 +245,10 @@ class ConfigFileManager
|
|||
$fullName = $this->baseDir . DIRECTORY_SEPARATOR . '.' . $name . '.php';
|
||||
|
||||
$config = [];
|
||||
if (file_exists($fullName)) {
|
||||
if (!file_exists($fullName)) {
|
||||
return $config;
|
||||
}
|
||||
|
||||
$a = new \stdClass();
|
||||
$a->config = [];
|
||||
include $fullName;
|
||||
|
@ -283,7 +286,7 @@ class ConfigFileManager
|
|||
$config['database']['database'] = $db_data;
|
||||
unset($db_data);
|
||||
}
|
||||
if (isset($config['system']['db_charset'])) {
|
||||
if (isset($config['system']) && isset($config['system']['db_charset'])) {
|
||||
$config['database']['charset'] = $config['system']['db_charset'];
|
||||
}
|
||||
if (isset($pidfile)) {
|
||||
|
@ -298,7 +301,6 @@ class ConfigFileManager
|
|||
$config['system']['language'] = $lang;
|
||||
unset($lang);
|
||||
}
|
||||
}
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue