Separate empty subject case from unknown mime type
authoralex-brainstorm <alex-brainstorm@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 10 Dec 2003 23:47:26 +0000 (23:47 +0000)
committeralex-brainstorm <alex-brainstorm@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 10 Dec 2003 23:47:26 +0000 (23:47 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6263 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/download.php

index a7286c9513a05d64b4e03ce215a5607d10c250b9..242326af56840984d57f582e5755695808be9a9a 100644 (file)
@@ -105,10 +105,11 @@ if (strlen($filename) < 1) {
         $suffix = 'ps';
     else if ($type1 == 'rfc822' && $type0 == 'message')
         $suffix = 'msg';
-    else {
-        $filename = 'untitled' . strip_tags($ent_id);
+    else
         $suffix = $type1;
-    }
+
+    if ($filename == '')
+        $filename = 'untitled' . strip_tags($ent_id);
     $filename = $filename . '.' . $suffix;
 }