Settings: delete NULL-value settings

This commit is contained in:
Thomas Gelf 2016-09-05 19:16:58 +00:00
parent 061705f52d
commit 687f2aff1c
1 changed files with 11 additions and 0 deletions

View File

@ -58,6 +58,17 @@ class Settings
{
$db = $this->db;
if ($value === null) {
$updated = $db->delete(
'director_setting',
$db->quoteInto('setting_name = ?', $name)
);
unset($this->cache[$name]);
return $this;
}
if ($this->getSetting($name) === $value) {
return $this;
}