Non-ascii characters caused problems with SVN function and were replaced
authorcentaurix <centaurix@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 20 Jul 2002 08:54:56 +0000 (08:54 +0000)
committercentaurix <centaurix@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 20 Jul 2002 08:54:56 +0000 (08:54 +0000)
with a ? by SourceForge.net in your original log message, which follows:
integrated patch 403567. this allows to integrate different user functionts to search for the users imapserver. it?s 100% backward comatible. i will do some work on conf.pl and so on to make it configurable without exact source knowlegde.

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

src/download.php

index c54b91f6f83147990f310c74409a45f93eee500b..0b7ba61394f2b720877b6a49cfdec208ffce76e0 100644 (file)
@@ -139,17 +139,25 @@ if (!$filename) {
 if (strlen($filename) < 1) {
     if ($type1 == 'plain' && $type0 == 'text') {
         $suffix = 'txt';
+       $filename = $header->subject . '.txt';
     } else if ($type1 == 'richtext' && $type0 == 'text') {
         $suffix = 'rtf';
+       $filename = $header->subject . '.rtf';
     } else if ($type1 == 'postscript' && $type0 == 'application') {
         $suffix = 'ps';
+       $filename = $header->subject . '.ps';
     } else if ($type1 == 'rfc822' && $type0 == 'message') {
         $suffix = 'eml';
+       $filename = $header->subject . '.msg';
     } else {
         $suffix = $type1;
     }
 
+    if (strlen($filename) < 1) {
     $filename = "untitled$passed_ent_id.$suffix";
+    } else {
+    $filename = "$filename.$suffix";
+    }
 }
 
 /*
@@ -290,4 +298,4 @@ function DumpHeaders($type0, $type1, $filename, $force) {
         }
     }
 }
-?>
\ No newline at end of file
+?>