Browse Source

fixed bug i introduced that always showed attachment box

Luke Ehresman 24 years ago
parent
commit
8d8593475c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      functions/mime.php

+ 2 - 2
functions/mime.php

@@ -521,7 +521,7 @@
    
          /** Display the ATTACHMENTS: message if there's more than one part **/
          $body .= "</TD></TR></TABLE>";
-         if (isset($message->entities)) {
+         if (isset($message->entities[0])) {
             $body .= formatAttachments ($message, $ent_num, $message->header->mailbox, $id);
          }
       } else {
@@ -535,7 +535,7 @@
    function formatAttachments ($message, $ent_id, $mailbox, $id) {
       global $where, $what;
       global $startMessage, $color;
-      static $ShownHTML;
+      static $ShownHTML = 0;
       
 	  $body = "";
       if ($ShownHTML == 0)