Fixed bug #1124764. Show unsafe images in printable view when
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 18 Feb 2005 00:33:07 +0000 (00:33 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 18 Feb 2005 00:33:07 +0000 (00:33 +0000)
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
src/read_body.php

index bb134f9a3885c60b0bfe3dffa2349ea0d8e67d23..4d5a703b1d1dd3fcb3825689e467bfbe7ace3ba7 100644 (file)
@@ -27,6 +27,7 @@ if ( ! sqgetGlobalVar('mailbox',$mailbox,SQ_GET) ||
     error_box(_("Invalid URL"),$color);
 } else {
     $passed_id= (int) $passed_id;
     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 '<frameset rows="60, *">' . "\n";
 /* end globals */
     displayHtmlHeader( _("Printer Friendly"), '', false, true );
     echo '<frameset rows="60, *">' . "\n";
@@ -35,6 +36,7 @@ if ( ! sqgetGlobalVar('mailbox',$mailbox,SQ_GET) ||
     echo '<frame src="printer_friendly_bottom.php?passed_ent_id='
         . urlencode($passed_ent_id) . '&amp;mailbox=' . urlencode($mailbox)
         . '&amp;passed_id=' . $passed_id
     echo '<frame src="printer_friendly_bottom.php?passed_ent_id='
         . urlencode($passed_ent_id) . '&amp;mailbox=' . urlencode($mailbox)
         . '&amp;passed_id=' . $passed_id
+        . '&amp;view_unsafe_images='.$view_unsafe_images
         . '" name="bottom_frame" frameborder="0" />' . "\n";
     echo "</frameset>\n";
 }
         . '" name="bottom_frame" frameborder="0" />' . "\n";
     echo "</frameset>\n";
 }
index 74f4e96008221366fbf291aaebe35eabb28d1fb7..f32330b1bd2993b404444390d510c3185124d574 100644 (file)
@@ -93,9 +93,16 @@ function findPreviousMessage($uidset, $passed_id) {
 function printer_friendly_link($mailbox, $passed_id, $passed_ent_id) {
     global $javascript_on;
 
 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) .
     $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");
 
 
     $print_text = _("View Printable Version");