X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=class%2Fmime%2FAddressStructure.class.php;h=7621b8f3b2cbb5da9179876cdb8572dd1d86707f;hp=ed5d9f21d9fb0cd8a060433bb966c45507b79ef3;hb=a1386fbfcfe114e7c140f99def4f5144ae38b2fb;hpb=19d470aa121cacdd916319ec6b55af180562805e diff --git a/class/mime/AddressStructure.class.php b/class/mime/AddressStructure.class.php index ed5d9f21..7621b8f3 100644 --- a/class/mime/AddressStructure.class.php +++ b/class/mime/AddressStructure.class.php @@ -3,7 +3,7 @@ /** * AddressStructure.class.php * - * Copyright (c) 2002 The SquirrelMail Project Team + * Copyright (c) 2003 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * * This contains functions needed to handle mime messages. @@ -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;