$header (shorthand for $message->header) is not known when this is a raw
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 1 Apr 2003 16:08:06 +0000 (16:08 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 1 Apr 2003 16:08:06 +0000 (16:08 +0000)
message we want to download. Fixes #712775

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4710 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/download.php

index dcbc23a659da3d66caf2201e555b21110ac16f48..9c6fdd52a4f3300ac71aefbab2f6e0d2cb04fb4e 100644 (file)
@@ -65,7 +65,7 @@ if ($ent_id) {
     /* raw message */
     $type0 = 'message';
     $type1 = 'rfc822';
-    $encoding = "US-ASCII";
+    $encoding = 'US-ASCII';
 }
 
 /*
@@ -90,8 +90,9 @@ if (is_object($message->header->disposition)) {
         $filename = $header->getParameter('name');
     }    
 } else {
-    $filename = $header->getParameter('name');
+    $filename = $message->header->getParameter('name');
 }
+
 $filename = decodeHeader($filename);
 if (strlen($filename) < 1) {
     if ($type1 == 'plain' && $type0 == 'text') {