Disable the show images stuff while reading html messages.
[squirrelmail.git] / functions / mime.php
index 263d55fc54df47f47d770e406b8b5deb49352b3e..278e5673f202a9a255e47322b19c8b16a1da5d16 100644 (file)
@@ -411,6 +411,7 @@ function mime_fetch_body ($imap_stream, $id, $ent_id ) {
                 $k++;
             }
             if ( $base <> '' )
+                
                 $ret = "<base href=\"$base\">" . $ret;
         }
     } else if (ereg('"([^"]*)"', $topline, $regs)) {
@@ -835,8 +836,11 @@ function encodeHeader ($string) {
 */
 function MagicHTML( $body, $id ) {
 
-    global $message, $PHP_SELF, $HTTP_SERVER_VARS;
+    global $message, $PHP_SELF, $HTTP_SERVER_VARS, 
+           $attachment_common_show_images;
 
+    $attachment_common_show_images =
+                     FALSE; // Don't display attached images in HTML mode
     $j = strlen( $body );   // Legnth of the HTML
     $ret = '';              // Returned string
     $bgcolor = '#ffffff';   // Background style color (defaults to white)
@@ -1023,7 +1027,7 @@ function MagicHTML( $body, $id ) {
 return( "\n\n<!-- HTML Output ahead -->\n" .
         $ret .
         "\n<!-- END of HTML Output --><base href=\"".
-        $HTTP_SERVER_VARS["SERVER_NAME"] . substr( $PHP_SELF, 0, strlen( $PHP_SELF ) - 13 ) .
+        get_location() . '/'.
         "\">\n\n" );
 }