code clean up. No need to use isset because the vars are properly
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 8 Oct 2002 12:28:47 +0000 (12:28 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 8 Oct 2002 12:28:47 +0000 (12:28 +0000)
initialized

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3811 7612ce4b-ef26-0410-bec9-ea0150e637f0

class/mime/AddressStructure.class.php

index ed5d9f2..f2144c1 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;