Reinsert Download as a file link
authorindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 10 Dec 2003 22:10:36 +0000 (22:10 +0000)
committerindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 10 Dec 2003 22:10:36 +0000 (22:10 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6261 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mime.php

index 0f810a82af130cc014f155f6af4879cc83361475..471d23322cd1fb78e93238b4a89fefaa1161391f 100644 (file)
@@ -393,12 +393,14 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma
             translateText($body, $wrap_at,
                           $body_message->header->getParameter('charset'));
         }
-        $link = 'read_body.php?passed_id=' . $id . '&amp;ent_id='.$ent_num.
+        $link = 'passed_id=' . $id . '&amp;ent_id='.$ent_num.
                 '&amp;mailbox=' . $urlmailbox .'&amp;sort=' . $sort .
                 '&amp;startMessage=' . $startMessage . '&amp;show_more=0';
         if (isset($passed_ent_id)) {
             $link .= '&amp;passed_ent_id='.$passed_ent_id;
         }
+        $body .= '<center><small><a href="download.php?absolute_dl=true&amp;' . 
+                 $link . '">' . _("Download this as a file") .  '</a>';
         if ($view_unsafe_images) {
             $text = _("Hide Unsafe Images");
         } else {
@@ -409,8 +411,10 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma
                 $text = '';
             }
         }
-        $body .= '<center><small><a href="'.$link.'">'.$text.
-                 '</a></small></center><br>' . "\n";
+        if($text != '') {
+            $body .= '&nbsp;|&nbsp;<a href="read_body.php?' . $link . '">' . $text . '</a>';
+        }
+        $body .= '</small></center><br>' . "\n";
     }
     return $body;
 }