Преглед на файлове

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;