From ec81dfc2f3505205d2c8eb7ad95cadec64353036 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 22 Oct 2010 11:35:43 -0600 Subject: [PATCH] Bug #9331: Only alter setting defaults if entry is in the same scope --- framework/Prefs/lib/Horde/Prefs.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/framework/Prefs/lib/Horde/Prefs.php b/framework/Prefs/lib/Horde/Prefs.php index 23da1ccab..a9220d58f 100644 --- a/framework/Prefs/lib/Horde/Prefs.php +++ b/framework/Prefs/lib/Horde/Prefs.php @@ -561,10 +561,11 @@ class Horde_Prefs implements ArrayAccess if (($prefs = $this->_storage->get($scope)) !== false) { foreach ($prefs as $name => $val) { - if ($this->isDefault($name)) { - $this->_scopes[$scope][$name]['d'] = $this->_scopes[$scope][$name]['v']; - - } elseif (!isset($this->_scopes[$scope][$name])) { + if (isset($this->_scopes[$scope][$name])) { + if ($this->isDefault($name)) { + $this->_scopes[$scope][$name]['d'] = $this->_scopes[$scope][$name]['v']; + } + } else { $this->_scopes[$scope][$name] = array( 'm' => 0 ); -- 2.11.0