From 59cdc26fb41d2bccb6da42af86125ea7fe2af8c8 Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Thu, 17 Apr 2014 21:59:23 +0200 Subject: [ticket/8558] Use only one variable and improve explain string PHPBB3-8558 --- phpBB/includes/functions_messenger.php | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'phpBB/includes') diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index ddbceae4de..73604d591b 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -484,28 +484,16 @@ class messenger $use_queue = true; } + $board_contact = (($config['board_contact_name']) ? '"' . mail_encode($config['board_contact_name']) . '" ' : '') . '<' . $config['board_contact'] . '>'; + if (empty($this->replyto)) { - if ($config['board_contact_name']) - { - $this->replyto = '"' . mail_encode($config['board_contact_name']) . '" <' . $config['board_contact'] . '>'; - } - else - { - $this->replyto = '<' . $config['board_contact'] . '>'; - } + $this->replyto = $board_contact; } if (empty($this->from)) { - if ($config['board_contact_name']) - { - $this->from = '"' . mail_encode($config['board_contact_name']) . '" <' . $config['board_contact'] . '>'; - } - else - { - $this->from = '<' . $config['board_contact'] . '>'; - } + $this->from = $board_contact; } $encode_eol = ($config['smtp_delivery']) ? "\r\n" : $this->eol; -- cgit v1.2.1