From 4c8986b46f9bb29fcb0ca66c80fbbf3c95b7898b Mon Sep 17 00:00:00 2001 From: indiri69 Date: Mon, 19 Dec 2005 00:06:03 +0000 Subject: [PATCH] Pass HTML viewing to View Printable git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10471 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/printer_friendly_bottom.php | 1 + src/printer_friendly_main.php | 4 +++- src/read_body.php | 7 ++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/printer_friendly_bottom.php b/src/printer_friendly_bottom.php index f4a2fde2..9f2f74bb 100644 --- a/src/printer_friendly_bottom.php +++ b/src/printer_friendly_bottom.php @@ -35,6 +35,7 @@ sqgetGlobalVar('mailbox', $mailbox, SQ_GET); if (! sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET) ) { $passed_ent_id = ''; } +sqgetGlobalVar('show_html_default', $show_html_default, SQ_FORM); /* end globals */ $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); diff --git a/src/printer_friendly_main.php b/src/printer_friendly_main.php index d1cfe9ba..a2842efe 100644 --- a/src/printer_friendly_main.php +++ b/src/printer_friendly_main.php @@ -28,6 +28,7 @@ if ( ! sqgetGlobalVar('mailbox',$mailbox,SQ_GET) || } else { $passed_id= (int) $passed_id; $view_unsafe_images = (bool) $_GET['view_unsafe_images']; + sqgetGlobalVar('show_html_default', $show_html_default, SQ_FORM); /* end globals */ displayHtmlHeader( _("Printer Friendly"), '', false, true ); echo '' . "\n"; @@ -37,9 +38,10 @@ if ( ! sqgetGlobalVar('mailbox',$mailbox,SQ_GET) || . urlencode($passed_ent_id) . '&mailbox=' . urlencode($mailbox) . '&passed_id=' . $passed_id . '&view_unsafe_images='.$view_unsafe_images + . '&show_html_default='.$show_html_default . '" name="bottom_frame" frameborder="0" />' . "\n"; echo "\n"; } ?> - \ No newline at end of file + diff --git a/src/read_body.php b/src/read_body.php index de7b9c43..2a48ccc7 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -80,7 +80,7 @@ function findPreviousMessage($uidset, $passed_id) { * @param int $passed_id */ function printer_friendly_link($mailbox, $passed_id, $passed_ent_id) { - global $javascript_on; + global $javascript_on, $show_html_default; /* hackydiehack */ if( !sqgetGlobalVar('view_unsafe_images', $view_unsafe_images, SQ_GET) ) { @@ -90,8 +90,9 @@ function printer_friendly_link($mailbox, $passed_id, $passed_ent_id) { } $params = '?passed_ent_id=' . urlencode($passed_ent_id) . '&mailbox=' . urlencode($mailbox) . - '&passed_id=' . urlencode($passed_id). - '&view_unsafe_images='. (bool) $view_unsafe_images; + '&passed_id=' . urlencode($passed_id) . + '&view_unsafe_images='. (bool) $view_unsafe_images . + '&show_html_default=' . $show_html_default; $print_text = _("View Printable Version"); -- 2.25.1