diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-06-21 15:41:40 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-06-21 15:41:40 +0200 |
commit | cd01dc027b8fb9cc4ce7237fbb8e7359c4a5d47e (patch) | |
tree | d1122010594349660e074b200b318f027a04d714 /program/steps/mail/func.inc | |
parent | fc6dab3c6740092e8063f73d73d150b754376445 (diff) |
Add option to set default message list mode - default_list_mode (#1487312)
Diffstat (limited to 'program/steps/mail/func.inc')
-rw-r--r-- | program/steps/mail/func.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index ac343ad5a..e8bf5e1fd 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -166,6 +166,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'); @@ -205,13 +206,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); } /** |