diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-05-03 16:57:04 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-05-29 02:14:40 +0200 |
commit | f01e0a2eef0604367620e8b9aa323f3feb86ea3c (patch) | |
tree | e2dcd7c7f72e0bc80f809d46ae3a6d25278c3508 /phpBB/phpbb | |
parent | ed8c16bf0ddb8fc8723aa870607f255d80aab55b (diff) | |
download | forums-f01e0a2eef0604367620e8b9aa323f3feb86ea3c.tar forums-f01e0a2eef0604367620e8b9aa323f3feb86ea3c.tar.gz forums-f01e0a2eef0604367620e8b9aa323f3feb86ea3c.tar.bz2 forums-f01e0a2eef0604367620e8b9aa323f3feb86ea3c.tar.xz forums-f01e0a2eef0604367620e8b9aa323f3feb86ea3c.zip |
[ticket/10073] Deduplicate the if statement
PHPBB3-10073
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/message/form.php | 11 | ||||
-rw-r--r-- | phpBB/phpbb/session.php | 9 |
2 files changed, 2 insertions, 18 deletions
diff --git a/phpBB/phpbb/message/form.php b/phpBB/phpbb/message/form.php index b57bf7423a..d7a42c4080 100644 --- a/phpBB/phpbb/message/form.php +++ b/phpBB/phpbb/message/form.php @@ -149,16 +149,7 @@ abstract class form $this->message->cc_sender(); } - - if ($this->config['contact_admin_form_enable']) - { - $board_contact = generate_board_url() . '/memberlist.' . $this->phpEx . '?mode=contactadmin'; - } - else - { - $board_contact = $this->config['board_contact']; - } - $this->message->send($messenger, $board_contact); + $this->message->send($messenger, phpbb_get_board_contact($this->config, $this->phpEx)); meta_refresh(3, append_sid($this->phpbb_root_path . 'index.' . $this->phpEx)); trigger_error($this->user->lang['EMAIL_SENT'] . '<br /><br />' . $this->get_return_message()); diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php index 093c013e42..c2669ea6cc 100644 --- a/phpBB/phpbb/session.php +++ b/phpBB/phpbb/session.php @@ -1233,14 +1233,7 @@ class session $till_date = ($ban_row['ban_end']) ? $this->format_date($ban_row['ban_end']) : ''; $message = ($ban_row['ban_end']) ? 'BOARD_BAN_TIME' : 'BOARD_BAN_PERM'; - if ($config['contact_admin_form_enable']) - { - $contact_link = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contactadmin'); - } - else - { - $contact_link = 'mailto:' . htmlspecialchars($config['board_contact']); - } + $contact_link = phpbb_get_board_contact_link($config, $phpbb_root_path, $phpEx); $message = sprintf($this->lang[$message], $till_date, '<a href="' . $contact_link . '">', '</a>'); $message .= ($ban_row['ban_give_reason']) ? '<br /><br />' . sprintf($this->lang['BOARD_BAN_REASON'], $ban_row['ban_give_reason']) : ''; $message .= '<br /><br /><em>' . $this->lang['BAN_TRIGGERED_BY_' . strtoupper($ban_triggered_by)] . '</em>'; |