From: ebullient Date: Sat, 10 May 2003 02:53:46 +0000 (+0000) Subject: Remove "absolute_dl" flag from default link for general attachments X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6b04287c4dd57388719ce6a4b79ff10d215515ff;p=squirrelmail.git Remove "absolute_dl" flag from default link for general attachments (general meaning not images, not messages, not something we have other special handling for).. The link with the attachment name should allow a view (if the type is known, while the download link will swizzle to application/octet-stream for download purposes... also fixed some SM_PATH references git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4851 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mime.php b/functions/mime.php index 9ed7c844..b2fb5e2a 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -410,11 +410,11 @@ function formatAttachments($message, $exclude_id, $mailbox, $id) { $type1 = strtolower($header->type1); $name = ''; $links['download link']['text'] = _("download"); - $links['download link']['href'] = - "../src/download.php?absolute_dl=true&passed_id=$id&mailbox=$urlMailbox&ent_id=$ent"; + $links['download link']['href'] = SM_PATH . + "src/download.php?absolute_dl=true&passed_id=$id&mailbox=$urlMailbox&ent_id=$ent"; $ImageURL = ''; if ($type0 =='message' && $type1 == 'rfc822') { - $default_page = '../src/read_body.php'; + $default_page = SM_PATH . 'src/read_body.php'; $rfc822_header = $att->rfc822_header; $filename = $rfc822_header->subject; if (trim( $filename ) == '') { @@ -429,7 +429,7 @@ function formatAttachments($message, $exclude_id, $mailbox, $id) { $from_name = decodeHeader(($from_name)); $description = $from_name; } else { - $default_page = '../src/download.php'; + $default_page = SM_PATH . 'src/download.php'; if (is_object($header->disposition)) { $filename = $header->disposition->getProperty('filename'); if (trim($filename) == '') { @@ -474,7 +474,7 @@ function formatAttachments($message, $exclude_id, $mailbox, $id) { } $defaultlink = $default_page . "?startMessage=$startMessage" . "&passed_id=$id&mailbox=$urlMailbox" - . '&ent_id='.$ent.$passed_ent_id_link.'&absolute_dl=true'; + . '&ent_id='.$ent.$passed_ent_id_link; if ($where && $what) { $defaultlink .= '&where='. urlencode($where).'&what='.urlencode($what); } @@ -1369,7 +1369,7 @@ function sq_cid2http($message, $id, $cidurl, $mailbox){ unsave link image */ $httpurl = ''; if ($linkurl) { - $httpurl = $quotchar . '../src/download.php?absolute_dl=true&' . + $httpurl = $quotchar . SM_PATH . 'src/download.php?absolute_dl=true&' . "passed_id=$id&mailbox=" . urlencode($mailbox) . '&ent_id=' . $linkurl . $quotchar; }