added bugfix from 1.0.3cvs
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 24 Feb 2001 16:44:46 +0000 (16:44 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 24 Feb 2001 16:44:46 +0000 (16:44 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1157 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
functions/mime.php
src/download.php

index cf5dc57..bb0f228 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,8 @@ Version 1.1.0 -- DEVELOPMENT
 Version 1.0.3 -- DEVELOPMENT
 ----------------------------
 - Made folder drop-down list consistant in look to the other drop-downs
+- Fixed problem where some attachment filenames would not be displayed
+- Added Finnish help files by Teemu Junnila <teejun@vallcom.com>
 
 Version 1.0.2 -- February 8, 2001 
 ---------------------------------
index 91572e5..53ae552 100644 (file)
@@ -28,7 +28,7 @@
       var $encoding = '', $size = 0, $to = array(), $from = '', $date = '';
       var $cc = array(), $bcc = array(), $reply_to = '', $subject = '';
       var $id = 0, $mailbox = '', $description = '', $filename = '';
-      var $entity_id = 0, $message_id = 0;
+      var $entity_id = 0, $message_id = 0, $name = '';
    }
    
    class message {
          if (!$message->entities) {
             $type0 = strtolower($message->header->type0);
             $type1 = strtolower($message->header->type1);
+            $name = decodeHeader($message->header->name);
             
             if ($message->header->entity_id != $ent_id) {
                $filename = decodeHeader($message->header->filename);
                if (trim($filename) == "") {
-                  $display_filename = "untitled-".$message->header->entity_id;
+                  if (trim($name) == "") { 
+                     $display_filename = "untitled-".$message->header->entity_id; 
+                  } else { 
+                     $display_filename = $name; 
+                     $filename = $name; 
+                  } 
                } else {
                   $display_filename = $filename;
                }
index af82eff..ee1b3da 100644 (file)
@@ -87,6 +87,9 @@
    if (isset($override_type1))
        $type1 = $override_type1;
    $filename = decodeHeader($header->filename);
+   if (!$filename) {
+      $filename = decodeHeader($header->name);
+   }
 
    if (strlen($filename) < 1) {
       if ($type1 == "plain" && $type0 == "text")                  $suffix = "txt";