diff --git a/program/actions/mail/show.php b/program/actions/mail/show.php index 59bd3c2eb79..1d027423214 100644 --- a/program/actions/mail/show.php +++ b/program/actions/mail/show.php @@ -439,7 +439,7 @@ public static function message_headers($attrib, $headers = null) // show these headers $standard_headers = ['subject', 'from', 'sender', 'to', 'cc', 'bcc', 'replyto', - 'mail-reply-to', 'mail-followup-to', 'date', 'priority']; + 'mail-reply-to', 'mail-followup-to', 'date', 'priority', 'folder']; $exclude_headers = !empty($attrib['exclude']) ? explode(',', $attrib['exclude']) : []; $output_headers = []; @@ -494,6 +494,19 @@ public static function message_headers($attrib, $headers = null) $ishtml = true; } elseif ($hkey == 'subject' && empty($value)) { $header_value = $rcmail->gettext('nosubject'); + } elseif ($hkey == 'folder') { + if (empty($_REQUEST['_search'])) { + continue; + } + + $search_set = $rcmail->storage->get_search_set(); + $multifolder = $search_set && !empty($search_set[1]->multi); + if ($multifolder) { + $mbox_name = $rcmail->storage->get_folder(); + $delimiter = $rcmail->storage->get_hierarchy_delimiter(); + $header_value = self::localize_foldername($mbox_name, true); + $header_value = str_replace($delimiter, " \xC2\xBB ", $header_value); + } } else { $value = is_array($value) ? implode(' ', $value) : $value; $header_value = trim(rcube_mime::decode_header($value, $charset));