summaryrefslogtreecommitdiff
path: root/program/steps/settings/save_folder.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-06-21 15:41:40 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-07-31 14:16:05 +0200
commitd1749659d25c5b68600aef3557284cedff8dded1 (patch)
treee3e9459679ec55dbfedb3531a60d814992eab9c9 /program/steps/settings/save_folder.inc
parent057444bd415a3b0fef503f88f44d29b95e50d64d (diff)
Backported option to set default message list mode - default_list_mode (#1487312)
Diffstat (limited to 'program/steps/settings/save_folder.inc')
-rw-r--r--program/steps/settings/save_folder.inc14
1 files changed, 5 insertions, 9 deletions
diff --git a/program/steps/settings/save_folder.inc b/program/steps/settings/save_folder.inc
index d1449bb38..a054224f1 100644
--- a/program/steps/settings/save_folder.inc
+++ b/program/steps/settings/save_folder.inc
@@ -115,15 +115,13 @@ if (!$error && !strlen($old)) {
if (isset($_POST['_viewmode'])) {
$a_threaded = (array) $RCMAIL->config->get('message_threading', array());
- if ($_POST['_viewmode'])
- $a_threaded[$folder['name']] = true;
- else
- unset($a_threaded[$folder['name']]);
+ $a_threaded[$folder['name']] = (bool) $_POST['_viewmode'];
$RCMAIL->user->save_prefs(array('message_threading' => $a_threaded));
}
rcmail_update_folder_row($folder['name'], null, $folder['subscribe'], $folder['class']);
+
$OUTPUT->show_message('foldercreated', 'confirmation');
// reset folder preview frame
$OUTPUT->command('subscription_select');
@@ -167,14 +165,12 @@ else if (!$error) {
}
else if (preg_match($oldprefix, $key)) {
unset($a_threaded[$key]);
- $a_threaded[preg_replace($oldprefix, $folder['name'].$delimiter, $key)] = true;
+ $a_threaded[preg_replace($oldprefix, $folder['name'].$delimiter, $key)] = $val;
}
}
}
- if ($_POST['_viewmode'])
- $a_threaded[$folder['name']] = true;
- else
- unset($a_threaded[$folder['name']]);
+
+ $a_threaded[$folder['name']] = (bool) $_POST['_viewmode'];
$RCMAIL->user->save_prefs(array('message_threading' => $a_threaded));
}