mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 10:16:36 +02:00
[ticket/10073] Fallback to board_contact when contact page is disabled
PHPBB3-10073
This commit is contained in:
@@ -149,7 +149,16 @@ abstract class form
|
||||
$this->message->cc_sender();
|
||||
}
|
||||
|
||||
$this->message->send($messenger, $this->phpEx);
|
||||
|
||||
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);
|
||||
|
||||
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());
|
||||
|
@@ -234,7 +234,7 @@ class message
|
||||
* @param string $phpEx
|
||||
* @return null
|
||||
*/
|
||||
public function send(\messenger $messenger, $phpEx)
|
||||
public function send(\messenger $messenger, $contact)
|
||||
{
|
||||
if (!sizeof($this->recipients))
|
||||
{
|
||||
@@ -263,7 +263,7 @@ class message
|
||||
$messenger->subject(htmlspecialchars_decode($this->subject));
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'BOARD_CONTACT' => generate_board_url() . '/memberlist.' . $phpEx . '?mode=contactadmin',
|
||||
'BOARD_CONTACT' => $contact,
|
||||
'TO_USERNAME' => htmlspecialchars_decode($recipient['to_name']),
|
||||
'FROM_USERNAME' => htmlspecialchars_decode($this->sender_name),
|
||||
'MESSAGE' => htmlspecialchars_decode($this->body))
|
||||
|
@@ -1233,7 +1233,15 @@ 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';
|
||||
|
||||
$message = sprintf($this->lang[$message], $till_date, '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contactadmin') . '">', '</a>');
|
||||
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']);
|
||||
}
|
||||
$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>';
|
||||
|
||||
|
Reference in New Issue
Block a user