From 9831c9e64bd8e0dddd3ce9ba866898917dd6315d Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 11 Nov 2008 01:02:42 -0700 Subject: [PATCH] Hide status messages; better attachment list display --- imp/message.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/imp/message.php b/imp/message.php index 5e1b558cf..4ebd76dbb 100644 --- a/imp/message.php +++ b/imp/message.php @@ -660,21 +660,24 @@ foreach (array('download', 'download_zip', 'img_save', 'strip') as $val) { /* Build body text. This needs to be done before we build the attachment list * that lives in the header. */ -$display_ids = $inline_ids = array(); +$display_ids = array(); $msgtext = ''; foreach ($summary['info']['render'] as $mime_id => $type) { - if (in_array($mime_id, $inline_ids)) { + if (in_array($mime_id, $display_ids)) { continue; } $render_part = $imp_contents->renderMIMEPart($mime_id, $type); - $inline_ids = array_merge($inline_ids, $render_part['ids']); + if (empty($render_part['ids'])) { + /* This meant that nothing was rendered - allow this part to appear + * in the attachment list instead. */ + continue; + } + $display_ids = array_merge($display_ids, $render_part['ids']); $summary_id = isset($render_part['summary_id']) ? $render_part['summary_id'] : $mime_id; - $display_ids[] = $summary_id; - $ptr = $summary['parts'][$summary_id]; $tmp_part = $tmp_status = array(); @@ -690,7 +693,7 @@ foreach ($summary['info']['render'] as $mime_id => $type) { $msgtext .= '' . implode(' ', $tmp_part) . '' . - implode(' ', $tmp_status) . + //implode(' ', $tmp_status) . $render_part['data']; } -- 2.11.0