summaryrefslogtreecommitdiff
path: root/program/steps/mail
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/mail
parent057444bd415a3b0fef503f88f44d29b95e50d64d (diff)
Backported option to set default message list mode - default_list_mode (#1487312)
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/func.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 10e0af6af..5cf5dfde5 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -142,6 +142,7 @@ function rcmail_init_env()
{
global $RCMAIL;
+ $default_threading = $RCMAIL->config->get('default_list_mode', 'list') == 'threads';
$a_threading = $RCMAIL->config->get('message_threading', array());
$message_sort_col = $RCMAIL->config->get('message_sort_col');
$message_sort_order = $RCMAIL->config->get('message_sort_order');
@@ -181,13 +182,15 @@ function rcmail_init_env()
$RCMAIL->storage->set_page($_SESSION['page'] = 1);
}
- unset($a_threading[$_SESSION['mbox']]);
+ $a_threading[$_SESSION['mbox']] = false;
}
$RCMAIL->user->save_prefs(array('message_threading' => $a_threading));
}
- $RCMAIL->storage->set_threading($a_threading[$_SESSION['mbox']]);
+ $threading = isset($a_threading[$_SESSION['mbox']]) ? $a_threading[$_SESSION['mbox']] : $default_threading;
+
+ $RCMAIL->storage->set_threading($threading);
}
/**