From: stekkel Date: Fri, 18 Feb 2005 00:33:07 +0000 (+0000) Subject: Fixed bug #1124764. Show unsafe images in printable view when X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=e2da1d80467aa6f6b68803733869c3c6b367ea89 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 --- 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");