close imapConnection
[squirrelmail.git] / class / mime.class.php
index 861586a034cdd5f4bebbfb01bf4486d878298778..7b818a703c570e722ead18a5fe1bef93d8a0c835 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
- * mime.class.php
+ * mime.class
  *
  * Copyright (c) 2002 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
@@ -769,17 +769,17 @@ class message {
               $this->type1 == 'message') &&
              isset($this->entity_id) ) {
             if (count($this->entities) == 0) {
-               if (!$this->header->disposition->name == 'attachment') {
+               if (strtolower($this->header->disposition->name) != 'attachment') {
                   $entity[] = $this->entity_id;
                }
             }
         } 
        $i = 0;
        while ( isset($this->entities[$i]) &&  !$found &&
-               !($this->entities[$i]->header->disposition->name 
-               == 'attachment') &&
-               !($this->entities[$i]->type0 == 'message' && 
-                 $this->entities[$i]->type1 == 'rfc822' )
+               (strtolower($this->entities[$i]->header->disposition->name) 
+               != 'attachment') &&
+               ($this->entities[$i]->type0 != 'message' && 
+                 $this->entities[$i]->type1 != 'rfc822' )
                )
                {
            $this->entities[$i]->findDisplayEntity(&$entity, $alt_order);
@@ -839,7 +839,8 @@ class message {
               }
            }
            if (!$exclude) {
-              if ($entity->type0 == 'multipart' && !$entity->type1 == 'related') {
+              if ($entity->type0 == 'multipart' && 
+                  $entity->type1 != 'related') {
                  $result = $entity->getAttachments($exclude_id, $result);
               } else if ($entity->type0 != 'multipart') {
                  $result[] = $entity;