From e2da1d80467aa6f6b68803733869c3c6b367ea89 Mon Sep 17 00:00:00 2001 From: stekkel Date: Fri, 18 Feb 2005 00:33:07 +0000 Subject: [PATCH] Fixed bug #1124764. Show unsafe images in printable view when view_unsafe_images is set to true. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8870 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/printer_friendly_main.php | 2 ++ src/read_body.php | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/printer_friendly_main.php b/src/printer_friendly_main.php index bb134f9a..4d5a703b 100644 --- a/src/printer_friendly_main.php +++ b/src/printer_friendly_main.php @@ -27,6 +27,7 @@ if ( ! sqgetGlobalVar('mailbox',$mailbox,SQ_GET) || error_box(_("Invalid URL"),$color); } else { $passed_id= (int) $passed_id; + $view_unsafe_images = (bool) $_GET['view_unsafe_images']; /* end globals */ displayHtmlHeader( _("Printer Friendly"), '', false, true ); echo '' . "\n"; @@ -35,6 +36,7 @@ if ( ! sqgetGlobalVar('mailbox',$mailbox,SQ_GET) || echo '' . "\n"; echo "\n"; } diff --git a/src/read_body.php b/src/read_body.php index 74f4e960..f32330b1 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -93,9 +93,16 @@ function findPreviousMessage($uidset, $passed_id) { function printer_friendly_link($mailbox, $passed_id, $passed_ent_id) { global $javascript_on; + /* hackydiehack */ + if( !sqgetGlobalVar('view_unsafe_images', $view_unsafe_images, SQ_GET) ) { + $view_unsafe_images = false; + } else { + $view_unsafe_images = true; + } $params = '?passed_ent_id=' . urlencode($passed_ent_id) . '&mailbox=' . urlencode($mailbox) . - '&passed_id=' . urlencode($passed_id); + '&passed_id=' . urlencode($passed_id). + '&view_unsafe_images='. (bool) $view_unsafe_images; $print_text = _("View Printable Version"); -- 2.25.1