summaryrefslogtreecommitdiff
path: root/program/steps/settings/save_prefs.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-07-31 21:30:25 +0000
committerthomascube <thomas@roundcube.net>2008-07-31 21:30:25 +0000
commit64f20dae0cdd3a53114053e3520eb30b71bfa42c (patch)
tree1ad62d1eef2712d4dc7e544b2b38687a3f7c1bd3 /program/steps/settings/save_prefs.inc
parentfaf8766fd2a34ad1eaf1545bab659ab459c074ad (diff)
Show real names in folder drop-down + rebuild default_imap_folders property when saving prefs
Diffstat (limited to 'program/steps/settings/save_prefs.inc')
-rw-r--r--program/steps/settings/save_prefs.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index ccd6e5f7b..3bccffae2 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -46,6 +46,18 @@ $a_user_prefs = array(
foreach ((array)$CONFIG['dont_override'] as $p)
$a_user_prefs[$p] = $CONFIG[$p];
+// special handling for 'default_imap_folders'
+if (in_array('default_imap_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_imap_folders'] = array('INBOX');
+ foreach (array('drafts_mbox','sent_mbox','junk_mbox','trash_mbox') as $p) {
+ if ($a_user_prefs[$p])
+ $a_user_prefs['default_imap_folders'][] = $a_user_prefs[$p];
+ }
+}
// switch UI language
if (isset($_POST['_language'])) {