From 5d39ca4d40c2b5c4de04b02e5e21e4a5a5f0e59d Mon Sep 17 00:00:00 2001 From: stekkel Date: Tue, 1 Apr 2003 16:49:45 +0000 Subject: [PATCH] Better place for picking up the header. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4711 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/download.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/download.php b/src/download.php index 9c6fdd52..710bdb6a 100644 --- a/src/download.php +++ b/src/download.php @@ -66,6 +66,7 @@ if ($ent_id) { $type0 = 'message'; $type1 = 'rfc822'; $encoding = 'US-ASCII'; + $header = $message->header; } /* @@ -90,7 +91,7 @@ if (is_object($message->header->disposition)) { $filename = $header->getParameter('name'); } } else { - $filename = $message->header->getParameter('name'); + $filename = $header->getParameter('name'); } $filename = decodeHeader($filename); @@ -112,7 +113,7 @@ if (strlen($filename) < 1) { } if (strlen($filename) < 1) { - $filename = 'untitled'.strip_tags($ent_id).$suffix; + $filename = 'untitled'.strip_tags($ent_id).'.'.$suffix; } else { $filename = "$filename.$suffix"; } -- 2.25.1