From e2ebc5a1ed2be758341bb8e276a1453a666152e4 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 20 Apr 2010 13:14:30 -0600 Subject: [PATCH] Bug #8980: Fix displaying all parts --- imp/lib/Ui/Message.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/imp/lib/Ui/Message.php b/imp/lib/Ui/Message.php index 99660d2de..7e098f8a4 100644 --- a/imp/lib/Ui/Message.php +++ b/imp/lib/Ui/Message.php @@ -503,10 +503,6 @@ class IMP_Ui_Message ? $options['show_parts'] : $GLOBALS['prefs']->getValue('parts_display'); - if ($show_parts == 'all') { - $atc_parts = array_keys($parts_list); - } - foreach ($parts_list as $mime_id => $mime_type) { if (isset($display_ids[$mime_id]) || isset($atc_parts[$mime_id])) { @@ -607,8 +603,12 @@ class IMP_Ui_Message $msgtext = $this->formatStatusMsg(array(array('text' => array(_("There are no parts that can be shown inline."))))); } + $atc_parts = ($show_parts == 'all') + ? array_diff(array_keys($atc_parts), array_keys($display_ids)) + : array_keys($atc_parts); + return array( - 'atc_parts' => array_keys($atc_parts), + 'atc_parts' => $atc_parts, 'display_ids' => array_keys($display_ids), 'js_onload' => $js_onload, 'msgtext' => $msgtext -- 2.11.0