From: stekkel Date: Thu, 30 Jan 2003 18:04:55 +0000 (+0000) Subject: get the filename from the properties if the is no disposition info available X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=aeccbe701c34e4d958e9a8c558852dfb871f010c;p=squirrelmail.git 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 --- 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 {