diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-08-06 19:29:53 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-08-06 19:29:53 +0200 |
commit | 371f7ca443081e6300e7971600b077ede4aec181 (patch) | |
tree | aec274cedc2342cb11f1303e513464f00503c444 /program/steps/mail | |
parent | b9d3e607bbc0e7430e99a5b0a5431a78f57d6680 (diff) |
Remove folder column after disabling multifolder scope (#1490022)
Diffstat (limited to 'program/steps/mail')
-rw-r--r-- | program/steps/mail/func.inc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index c6c0b95e6..41fe28e7a 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -384,13 +384,18 @@ function rcmail_js_message_list($a_headers, $insert_top=false, $a_show_cols=null $head_replace = true; } - // add 'folder' column to list on multi-folder searches - $search_set = $RCMAIL->storage->get_search_set(); + $search_set = $RCMAIL->storage->get_search_set(); $multifolder = $search_set && $search_set[1]->multi; + + // add/remove 'folder' column to the list on multi-folder searches if ($multifolder && !in_array('folder', $a_show_cols)) { $a_show_cols[] = 'folder'; $head_replace = true; } + else if (!$multifolder && ($found = array_search('folder', $a_show_cols)) !== false) { + unset($a_show_cols[$found]); + $head_replace = true; + } $mbox = $RCMAIL->storage->get_folder(); @@ -402,6 +407,7 @@ function rcmail_js_message_list($a_headers, $insert_top=false, $a_show_cols=null // Make sure there are no duplicated columns (#1486999) $a_show_cols = array_unique($a_show_cols); + $_SESSION['list_attrib']['columns'] = $a_show_cols; // Plugins may set header's list_cols/list_flags and other rcube_message_header variables // and list columns |