diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-06-11 19:16:57 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-06-11 19:16:57 +0200 |
commit | f105dbb7691dd2ae919486a3b82b98be494e94be (patch) | |
tree | cbefe9983d4117ad24288552c114a80f1aaff172 | |
parent | 0a5088758e4da6b80982f4fee16c48e7cc0e2fcc (diff) |
Fix PHP error in Preferences when default_folders was in dont_override (#1489940)
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | program/steps/settings/func.inc | 3 | ||||
-rw-r--r-- | program/steps/settings/save_prefs.inc | 15 |
3 files changed, 7 insertions, 12 deletions
@@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix PHP error in Preferences when default_folders was in dont_override (#1489940) - Add configurable LDAP_OPT_DEREF option (#1489864) - Fix unintentional draft autosave request if autosave is disabled (#1489882) - Fix malformed References: header in send/saved mail (#1489891) diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index c5f5ba736..0aae19719 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -1035,7 +1035,8 @@ function rcmail_user_prefs($current = null) } // Configure special folders - if (!isset($no_override['default_folders']) && $current) { + $set = array('drafts_mbox', 'sent_mbox', 'junk_mbox', 'trash_mbox'); + if ($current && count(array_intersect($no_override, $set)) < 4) { $select = $RCMAIL->folder_selector(array( 'noselection' => '---', 'realnames' => true, diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index f71eee39a..fba2b351f 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -192,17 +192,10 @@ case 'addressbook': case 'folders': // special handling for 'default_folders' - if (in_array('default_folders', (array)$CONFIG['dont_override'])) { - foreach (array('drafts_mbox','sent_mbox','junk_mbox','trash_mbox') as $p) { - $a_user_prefs[$p] = $CONFIG[$p]; - } - } - else { - $a_user_prefs['default_folders'] = array('INBOX'); - foreach (array('drafts_mbox','sent_mbox','junk_mbox','trash_mbox') as $p) { - if ($a_user_prefs[$p]) { - $a_user_prefs['default_folders'][] = $a_user_prefs[$p]; - } + $a_user_prefs['default_folders'] = array('INBOX'); + foreach (array('drafts_mbox', 'sent_mbox', 'junk_mbox', 'trash_mbox') as $p) { + if ($a_user_prefs[$p]) { + $a_user_prefs['default_folders'][] = $a_user_prefs[$p]; } } |