Merge pull request #1325 from nextcloud/enh/noid/json-improvements

prettify json and unescape slashes
This commit is contained in:
Simon L 2022-10-27 00:16:18 +02:00 committed by GitHub
commit 53044c8354
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -443,7 +443,7 @@ class ConfigurationManager
if ($df !== false && (int)$df < 10240) {
throw new InvalidSettingConfigurationException(DataConst::GetDataDirectory() . " does not have enough space for writing the config file! Not writing it back!");
}
file_put_contents(DataConst::GetConfigFile(), json_encode($config));
file_put_contents(DataConst::GetConfigFile(), json_encode($config, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT));
}
private function GetEnvironmentalVariableOrConfig(string $envVariableName, string $configName, string $defaultValue) : string {