From aeccbe701c34e4d958e9a8c558852dfb871f010c Mon Sep 17 00:00:00 2001 From: stekkel Date: Thu, 30 Jan 2003 18:04:55 +0000 Subject: [PATCH] get the filename from the properties if the is no disposition info available in the bodystructure. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4484 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/functions/mime.php b/functions/mime.php index 320e67e5..09a76553 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -442,13 +442,15 @@ function formatAttachments($message, $exclude_id, $mailbox, $id) { } } } else { - if (trim( $header->id ) == '') { - $filename = 'untitled-[' . $ent . ']' ; - } else { - $filename = 'cid: ' . $header->id; - } - } - + $filename = decodeHeader($header->getParameter('name')); + if (!trim($filename)) { + if (trim( $header->id ) == '') { + $filename = 'untitled-[' . $ent . ']' ; + } else { + $filename = 'cid: ' . $header->id; + } + } + } if ($header->description) { $description = htmlspecialchars($header->description); } else { -- 2.25.1