diff options
author | alecpl <alec@alec.pl> | 2011-02-15 19:36:10 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-02-15 19:36:10 +0000 |
commit | bfb7d6e6819c8453d3e7c5c6d4fb261af078b176 (patch) | |
tree | 2e1823612582140c9fcff4ffb5504efd63048ed2 /program/include | |
parent | 3221c95a29c19677ff7c82e259aa683de4c224e7 (diff) |
- Fix dont_override setting does not override existing user preferences (#1487664)
Diffstat (limited to 'program/include')
-rw-r--r-- | program/include/rcube_config.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/program/include/rcube_config.php b/program/include/rcube_config.php index 81b664a29..5d176053e 100644 --- a/program/include/rcube_config.php +++ b/program/include/rcube_config.php @@ -188,8 +188,18 @@ class rcube_config */ public function set_user_prefs($prefs) { + // Honor the dont_override setting for any existing user preferences + $dont_override = $this->get('dont_override'); + if (is_array($dont_override) && !empty($dont_override)) { + foreach ($prefs as $key => $pref) { + if (in_array($key, $dont_override)) { + unset($prefs[$key]); + } + } + } + $this->userprefs = $prefs; - $this->prop = array_merge($this->prop, $prefs); + $this->prop = array_merge($this->prop, $prefs); } |