summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG1
-rw-r--r--program/include/rcube_config.php12
2 files changed, 12 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index a93ad5799..557d7ab88 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
+- Fix dont_override setting does not override existing user preferences (#1487664)
- Use only one from IMAP authentication methods to prevent login delays (1487784)
- Replying to a sent message puts the old recipient as the new recipient (#1487074)
- Fulltext search over (almost) all data for contacts
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);
}