From 14c85e395cfeabd2e09e30c90f9031df122081c0 Mon Sep 17 00:00:00 2001 From: stevetruckstuff Date: Thu, 5 Oct 2006 22:00:07 +0000 Subject: [PATCH] create separate vars for download link and unsafe image toggle for later use with templates. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11838 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/functions/mime.php b/functions/mime.php index 1d7f0321..6210c57f 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -355,7 +355,8 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma */ global $startMessage, $languages, $squirrelmail_language, $show_html_default, $sort, $has_unsafe_images, $passed_ent_id, - $use_iframe, $iframe_height, $download_and_unsafe_link; + $use_iframe, $iframe_height, $download_and_unsafe_link, + $download_href, $unsafe_image_toggle_href, $unsafe_image_toggle_text; // workaround for not updated config.php if (! isset($use_iframe)) $use_iframe = false; @@ -474,8 +475,8 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma if (isset($passed_ent_id)) { $link .= '&passed_ent_id='.$passed_ent_id; } - $download_and_unsafe_link .= ' | ' . _("Download this as a file") . ''; + $download_href = SM_PATH . 'src/download.php?absolute_dl=true&' . $link; + $download_and_unsafe_link .= ' | ' . _("Download this as a file") . ''; if ($view_unsafe_images) { $text = _("Hide Unsafe Images"); } else { @@ -487,7 +488,9 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma } } if($text != '') { - $download_and_unsafe_link .= ' | ' . $text . ''; + $unsafe_image_toggle_href = SM_PATH . 'src/read_body.php?'.$link; + $unsafe_image_toggle_text = $text; + $download_and_unsafe_link .= ' | ' . $text . ''; } } return $body; -- 2.25.1