From ec5201f221a90d04045c2e24ea6f977f15a9bb4b Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Wed, 22 Sep 2010 17:00:57 -0400 Subject: [PATCH] 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. --- framework/Core/lib/Horde/Config.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.11.0