From 9a2264ba0e95cc57c88ee10ea03c28e2d0c9f7ee Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 15 Jul 2016 09:47:07 +0200 Subject: [PATCH] Fix regression where messages with no text part (but e.g. application/zip) were not displayed as an attachment (#5357) --- program/lib/Roundcube/rcube_message.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php index c021d58a4..eb7516c47 100644 --- a/program/lib/Roundcube/rcube_message.php +++ b/program/lib/Roundcube/rcube_message.php @@ -905,11 +905,7 @@ class rcube_message } } // message is a single part non-text - else if ($structure->filename) { - $this->add_part($structure, $attachment); - } - // message is a single part non-text (without filename) - else if (preg_match('/application\//i', $mimetype)) { + else if ($structure->filename || preg_match('/^application\//i', $mimetype)) { $this->add_part($structure, 'attachment'); } }