From 4906eb830c29f6cf172595bd3b035b063282d9e1 Mon Sep 17 00:00:00 2001 From: alecpl Date: Fri, 11 Sep 2009 12:11:16 +0000 Subject: - show Recipient column also for subfolders of Sent/Drafts --- program/steps/mail/func.inc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index ed36e84a8..4cb2f8176 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -152,10 +152,11 @@ function rcmail_message_list($attrib) $a_sort_cols = array('subject', 'date', 'from', 'to', 'size'); $mbox = $IMAP->get_mailbox_name(); - - // show 'to' instead of from in sent messages - if (($mbox==$CONFIG['sent_mbox'] || $mbox==$CONFIG['drafts_mbox']) && ($f = array_search('from', $a_show_cols)) - && !array_search('to', $a_show_cols)) + $delim = $IMAP->get_hierarchy_delimiter(); + + // show 'to' instead of 'from' in sent/draft messages + if ((strpos($mbox.$delim, $CONFIG['sent_mbox'].$delim)===0 || strpos($mbox.$delim, $CONFIG['drafts_mbox'].$delim)===0) + && ($f = array_search('from', $a_show_cols)) && !array_search('to', $a_show_cols)) $a_show_cols[$f] = 'to'; // add col definition @@ -392,9 +393,10 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $replace=TRUE) $a_show_cols = $_SESSION['list_columns']; $mbox = $IMAP->get_mailbox_name(); - - // show 'to' instead of from in sent messages - if (($mbox == $CONFIG['sent_mbox'] || $mbox == $CONFIG['drafts_mbox']) + $delim = $IMAP->get_hierarchy_delimiter(); + + // show 'to' instead of 'from' in sent/draft messages + if ((strpos($mbox.$delim, $CONFIG['sent_mbox'].$delim)===0 || strpos($mbox.$delim, $CONFIG['drafts_mbox'].$delim)===0) && (($f = array_search('from', $a_show_cols)) !== false) && array_search('to', $a_show_cols) === false) $a_show_cols[$f] = 'to'; -- cgit v1.2.3