From: stekkel Date: Tue, 1 Apr 2003 16:49:45 +0000 (+0000) Subject: Better place for picking up the header. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5d39ca4d40c2b5c4de04b02e5e21e4a5a5f0e59d;p=squirrelmail.git 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 --- 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"; }