summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-09-11 12:11:16 +0000
committeralecpl <alec@alec.pl>2009-09-11 12:11:16 +0000
commit4906eb830c29f6cf172595bd3b035b063282d9e1 (patch)
tree63dc9401214e87dde2ff2dee8521b68ae17b47f1
parent2b820727b1e50b8892dda4666e86ce558e585185 (diff)
- show Recipient column also for subfolders of Sent/Drafts
-rw-r--r--program/steps/mail/func.inc16
1 files 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';