From 53bd5aa2f51d8c34d6927d4bdc8b3e498592cb09 Mon Sep 17 00:00:00 2001 From: stekkel Date: Tue, 8 Oct 2002 12:28:47 +0000 Subject: [PATCH 1/1] code clean up. No need to use isset because the vars are properly 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 | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/class/mime/AddressStructure.class.php b/class/mime/AddressStructure.class.php index ed5d9f21..f2144c12 100644 --- a/class/mime/AddressStructure.class.php +++ b/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; -- 2.25.1