code clean up. No need to use isset because the vars are properly
[squirrelmail.git] / class / mime / AddressStructure.class.php
index ed5d9f21d9fb0cd8a060433bb966c45507b79ef3..f2144c126a8e334fb6fad8012e114ac3d3987b52 100644 (file)
@@ -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;