소스 검색

code clean up. No need to use isset because the vars are properly
initialized

stekkel 23 년 전
부모
커밋
2c54f7ea8b
1개의 변경된 파일5개의 추가작업 그리고 11개의 파일을 삭제
  1. 5 11
      class/mime/AddressStructure.class.php

+ 5 - 11
class/mime/AddressStructure.class.php

@@ -22,17 +22,11 @@ class AddressStructure {
         $result = '';
 
         if (is_object($this)) {
-            if (isset($this->host) && ($this->host != '')) {
-                $email = $this->mailbox.'@'.$this->host;
-            } else {
-                $email = $this->mailbox;
-            }
-            if (trim($this->personal) != '') {
-                if ($email) {
-                    $addr = '"' . $this->personal . '" <' .$email.'>';
-                } else {
-                    $addr = $this->personal;
-                }
+            $email = ($this->host ? $this->mailbox.'@'.$this->host
+	                          : $this->mailbox);
+            if (trim($this->personal)) {
+	        $addr = ($email ? '"' . $this->personal . '" <' .$email.'>'
+		                : $this->personal);
                 $best_dpl = $this->personal;
             } else {
                 $addr = $email;