* order that is their priority.
*/
global $startMessage, $languages, $squirrelmail_language,
- $show_html_default, $sort, $has_unsafe_images, $passed_ent_id, $use_iframe,$iframe_height;
+ $show_html_default, $sort, $has_unsafe_images, $passed_ent_id,
+ $use_iframe, $iframe_height, $download_and_unsafe_link;
// workaround for not updated config.php
if (! isset($use_iframe)) $use_iframe = false;
return $body;
}
+ $download_and_unsafe_link = '';
+
$link = 'passed_id=' . $id . '&ent_id='.$ent_num.
'&mailbox=' . $urlmailbox .'&sort=' . $sort .
'&startMessage=' . $startMessage . '&show_more=0';
if (isset($passed_ent_id)) {
$link .= '&passed_ent_id='.$passed_ent_id;
}
- $body .= '<div style="text-align: center;"><small><a href="download.php?absolute_dl=true&' .
+ $download_and_unsafe_link .= ' | <a href="download.php?absolute_dl=true&' .
$link . '">' . _("Download this as a file") . '</a>';
if ($view_unsafe_images) {
$text = _("Hide Unsafe Images");
}
}
if($text != '') {
- $body .= ' | <a href="read_body.php?' . $link . '">' . $text . '</a>';
+ $download_and_unsafe_link .= ' | <a href="read_body.php?' . $link . '">' . $text . '</a>';
}
- $body .= '</small></div><br />' . "\n";
}
return $body;
}
} // end fn SendDownloadHeaders
-?>
+?>
\ No newline at end of file
}
function formatToolbar($mailbox, $passed_id, $passed_ent_id, $message, $color) {
- global $base_uri, $where, $what;
+ global $base_uri, $where, $what, $download_and_unsafe_link;
$urlMailbox = urlencode($mailbox);
$urlPassed_id = urlencode($passed_id);
$s .= ' | ' .
printer_friendly_link($mailbox, $passed_id, $passed_ent_id);
echo $s;
+
+ /* Output the download and/or unsafe images link/-s, if any. */
+ if ($download_and_unsafe_link) {
+ echo $download_and_unsafe_link;
+ }
+
do_hook("read_body_header_right");
$s = "</small></td>\n" .
"</tr>\n";