Changed the way attachments are viewed. Now, clicking on the filename
authorgustavf <gustavf@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 11 Jul 2000 09:58:33 +0000 (09:58 +0000)
committergustavf <gustavf@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 11 Jul 2000 09:58:33 +0000 (09:58 +0000)
is "view" and a link behind is "download" (application/octet.stream).

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

functions/mime.php

index eeb461b34e830deb63d5715bee583e23bf5e1f91..12ec00e854de5344e2fc1c7cc1a92732d6ae9346 100644 (file)
    
                $urlMailbox = urlencode($mailbox);
                $ent = urlencode($message->header->entity_id);
-               $body .= "<TT>&nbsp;&nbsp;&nbsp;<A HREF=\"../src/download.php?passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent\">" . $display_filename . "</A>&nbsp;&nbsp;(TYPE: $type0/$type1)";
+               $body .= "<TT>&nbsp;&nbsp;&nbsp;<A HREF=\"../src/download.php?passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent&view=true\">" . $display_filename . "</A>&nbsp;&nbsp;(TYPE: $type0/$type1)";
                if ($message->header->description)
                   $body .= "&nbsp;&nbsp;<b>" . htmlspecialchars($message->header->description)."</b>";
-               if ($message->header->type0 == "image" &&
-                   ($message->header->type1 == "jpg" ||
-                    $message->header->type1 == "jpeg" ||
-                    $message->header->type1 == "gif" ||
-                    $message->header->type1 == "png"))
-                  $body .= "&nbsp;(<a href=\"../src/download.php?passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent&view=true\">"._("view")."</a>)\n";     
+               $body .= "&nbsp;(<a href=\"../src/download.php?passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent\">"._("download")."</a>)\n";     
                $body .= "</TT><BR>";
                $num++;
             }