summaryrefslogtreecommitdiff
path: root/program/steps/settings/folders.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-06-21 15:41:40 +0200
committerAleksander Machniak <alec@alec.pl>2014-06-21 15:41:40 +0200
commitcd01dc027b8fb9cc4ce7237fbb8e7359c4a5d47e (patch)
treed1122010594349660e074b200b318f027a04d714 /program/steps/settings/folders.inc
parentfc6dab3c6740092e8063f73d73d150b754376445 (diff)
Add option to set default message list mode - default_list_mode (#1487312)
Diffstat (limited to 'program/steps/settings/folders.inc')
-rw-r--r--program/steps/settings/folders.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc
index 1bcfb4cfc..8b74a59e1 100644
--- a/program/steps/settings/folders.inc
+++ b/program/steps/settings/folders.inc
@@ -406,16 +406,17 @@ function rcmail_rename_folder($oldname, $newname)
$a_threaded = (array) $RCMAIL->config->get('message_threading', array());
$oldprefix = '/^' . preg_quote($oldname . $delimiter, '/') . '/';
- foreach (array_keys($a_threaded) as $key) {
+ foreach ($a_threaded as $key => $val) {
if ($key == $oldname) {
unset($a_threaded[$key]);
- $a_threaded[$newname] = true;
+ $a_threaded[$newname] = $val;
}
else if (preg_match($oldprefix, $key)) {
unset($a_threaded[$key]);
- $a_threaded[preg_replace($oldprefix, $newname.$delimiter, $key)] = true;
+ $a_threaded[preg_replace($oldprefix, $newname.$delimiter, $key)] = $val;
}
}
+
$RCMAIL->user->save_prefs(array('message_threading' => $a_threaded));
// #1488692: update session