I do devel in SquirrelMail too.
[squirrelmail.git] / functions / mime.php
index 5e6371ff17d333dc8fd35250684e57faa9328e77..c9a1892d9bea51b658e01bcc099c2174cf5d21ed 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * mime.php
  *
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * This contains the functions necessary to detect and decode MIME
@@ -326,13 +326,8 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma
     global $startMessage, $username, $key, $imapServerAddress, $imapPort,
            $show_html_default, $sort, $has_unsafe_images;
 
-    if ( !check_php_version(4,1) ) {
-        global $_GET;
-    }
-    if(isset($_GET['view_unsafe_images'])) {
-        $view_unsafe_images = $_GET['view_unsafe_images'];
-    } else {
-       $view_unsafe_images = false;
+    if( !sqgetGlobalVar('view_unsafe_images', $view_unsafe_images, SQ_GET) ) {
+        $view_unsafe_images = false;
     }
 
     $body = '';
@@ -377,7 +372,7 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma
            if (isset($has_unsafe_images) && $has_unsafe_images) {
                $untext = '&view_unsafe_images=1">' . _("View Unsafe Images");
            } else {
-               $untext = '';
+               $untext = '">';
            }
         }
         $body .= '<center><small><a href="read_body.php?passed_id=' . $id .
@@ -1596,9 +1591,7 @@ function magicHTML($body, $id, $message, $mailbox = 'INBOX') {
                           )
                 )
         );
-    if(isset($_GET['view_unsafe_images'])) {
-        $view_unsafe_images = $_GET['view_unsafe_images'];
-    } else {
+    if( !sqgetGlobalVar('view_unsafe_images', $view_unsafe_images, SQ_GET) ) {
        $view_unsafe_images = false;
     }
     if (!$view_unsafe_images){