mirror of
https://github.com/friendica/friendica
synced 2025-04-23 10:30:11 +00:00
Assure that deleted cat/keys are working as expected
- A deleted cache-key would delete a merged cache-key as well - Deleting a key in the Model results in reloading the config to assure any value from underlying files
This commit is contained in:
parent
fd882abd80
commit
11a8bd17e3
5 changed files with 65 additions and 42 deletions
|
@ -71,6 +71,8 @@ class Config implements IManageConfigValues
|
|||
{
|
||||
try {
|
||||
$this->configFileManager->saveData($this->configCache);
|
||||
// reload after the save to possible reload default values of lower source-priorities again
|
||||
$this->reload();
|
||||
} catch (ConfigFileException $e) {
|
||||
throw new ConfigPersistenceException('Cannot save config', $e);
|
||||
}
|
||||
|
@ -116,7 +118,7 @@ class Config implements IManageConfigValues
|
|||
/** {@inheritDoc} */
|
||||
public function delete(string $cat, string $key): bool
|
||||
{
|
||||
if ($this->configCache->delete($cat, $key, Cache::SOURCE_DATA)) {
|
||||
if ($this->configCache->delete($cat, $key)) {
|
||||
$this->save();
|
||||
return true;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue