From: Michael J. Rubinsky Date: Wed, 22 Sep 2010 21:00:57 +0000 (-0400) Subject: Don't reset the config value if it's not set AND not the default. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ec5201f221a90d04045c2e24ea6f977f15a9bb4b;p=horde.git Don't reset the config value if it's not set AND not the default. Otherwise, we overwrite fields that are explicitly emptied with the previous values. --- diff --git a/framework/Core/lib/Horde/Config.php b/framework/Core/lib/Horde/Config.php index c5269f81c..b3e528ca3 100644 --- a/framework/Core/lib/Horde/Config.php +++ b/framework/Core/lib/Horde/Config.php @@ -314,7 +314,10 @@ class Horde_Config } } elseif (isset($configitem['_type'])) { $val = $formvars->getExists($configname, $wasset); - if (!$wasset) { + if (!$wasset && + ((array_key_exists('is_default', $configitem) && $configitem['is_default']) + || !array_key_exists('is_default', $configitem))) { + $val = isset($configitem['default']) ? $configitem['default'] : null; }