mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-11 06:14:26 +02:00
Config fixings
- Delete now really overwrites static default/setting.config.php keys - Delete now really overwrites static default/setting.config.php categories - The Update::check() routine is added to different places - Merge the given config file with the new config before writing - Remove ConfigTransaction::get() because it's no more reliable
This commit is contained in:
parent
cdd57275eb
commit
5aa8e8adf1
13 changed files with 221 additions and 181 deletions
|
@ -34,6 +34,12 @@ class ConfigFileTransformer
|
|||
$categories = array_keys($data);
|
||||
|
||||
foreach ($categories as $category) {
|
||||
|
||||
if (is_null($data[$category])) {
|
||||
$dataString .= "\t'$category' => null," . PHP_EOL;
|
||||
continue;
|
||||
}
|
||||
|
||||
$dataString .= "\t'$category' => [" . PHP_EOL;
|
||||
|
||||
if (is_array($data[$category])) {
|
||||
|
@ -66,7 +72,9 @@ class ConfigFileTransformer
|
|||
{
|
||||
$string = str_repeat("\t", $level + 2) . "'$key' => ";
|
||||
|
||||
if (is_array($value)) {
|
||||
if (is_null($value)) {
|
||||
$string .= "null,";
|
||||
} elseif (is_array($value)) {
|
||||
$string .= "[" . PHP_EOL;
|
||||
$string .= static::extractArray($value, ++$level);
|
||||
$string .= str_repeat("\t", $level + 1) . '],';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue