浏览代码

finddisplayentity related fix

stekkel 23 年之前
父节点
当前提交
7351378c3d
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      class/mime.class.php

+ 6 - 5
class/mime.class.php

@@ -763,23 +763,24 @@ class message {
 		}
 		}
 		$found = true;		
 		$found = true;		
 	    }
 	    }
+	    $found = true;		
 	} else if ( $this->type0 == 'text' &&
 	} else if ( $this->type0 == 'text' &&
              ( $this->type1 == 'plain' ||
              ( $this->type1 == 'plain' ||
                $this->type1 == 'html' ||
                $this->type1 == 'html' ||
 	       $this->type1 == 'message') &&
 	       $this->type1 == 'message') &&
              isset($this->entity_id) ) {
              isset($this->entity_id) ) {
 	     if (count($this->entities) == 0) {
 	     if (count($this->entities) == 0) {
-	        if (!$this->header->disposition->name == 'attachment') {
+	        if ($this->header->disposition->name != 'attachment') {
         	   $entity[] = $this->entity_id;
         	   $entity[] = $this->entity_id;
 		}
 		}
 	     }
 	     }
         } 
         } 
     	$i = 0;
     	$i = 0;
     	while ( isset($this->entities[$i]) &&  !$found &&
     	while ( isset($this->entities[$i]) &&  !$found &&
-	        !($this->entities[$i]->header->disposition->name 
-	        == 'attachment') &&
-	        !($this->entities[$i]->type0 == 'message' && 
-		  $this->entities[$i]->type1 == 'rfc822' )
+	        ($this->entities[$i]->header->disposition->name 
+	        != 'attachment') &&
+	        ($this->entities[$i]->type0 != 'message' && 
+		  $this->entities[$i]->type1 != 'rfc822' )
 		)
 		)
 	        {
 	        {
     	    $this->entities[$i]->findDisplayEntity(&$entity, $alt_order);
     	    $this->entities[$i]->findDisplayEntity(&$entity, $alt_order);