mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-08 17:56:52 +02:00
[ticket/10073] Replace board_contact mail with links to contact page
Error pages still contain the email address. PHPBB3-10073
This commit is contained in:
committed by
Joas Schilling
parent
d52f34f5ec
commit
389bc0b8dd
@@ -201,7 +201,7 @@ class acp_email
|
||||
$messenger->set_mail_priority($priority);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'CONTACT_EMAIL' => $config['board_contact'],
|
||||
'CONTACT_EMAIL' => generate_board_url() . '/memberlist.' . $phpEx . '?mode=contactadmin',
|
||||
'MESSAGE' => htmlspecialchars_decode($message))
|
||||
);
|
||||
|
||||
|
@@ -96,7 +96,7 @@ class phpbb_captcha_plugins_captcha_abstract
|
||||
else
|
||||
{
|
||||
$link = append_sid($phpbb_root_path . 'ucp.' . $phpEx, 'mode=confirm&confirm_id=' . $this->confirm_id . '&type=' . $this->type);
|
||||
$explain = $user->lang(($this->type != CONFIRM_POST) ? 'CONFIRM_EXPLAIN' : 'POST_CONFIRM_EXPLAIN', '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
|
||||
$explain = $user->lang(($this->type != CONFIRM_POST) ? 'CONFIRM_EXPLAIN' : 'POST_CONFIRM_EXPLAIN', '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contactadmin') . '">', '</a>');
|
||||
|
||||
$template->assign_vars(array(
|
||||
'CONFIRM_IMAGE_LINK' => $link,
|
||||
|
@@ -150,7 +150,7 @@ class phpbb_recaptcha extends phpbb_default_captcha
|
||||
|
||||
function get_template()
|
||||
{
|
||||
global $config, $user, $template;
|
||||
global $config, $user, $template, $phpbb_root_path, $phpEx;
|
||||
|
||||
if ($this->is_solved())
|
||||
{
|
||||
@@ -158,7 +158,7 @@ class phpbb_recaptcha extends phpbb_default_captcha
|
||||
}
|
||||
else
|
||||
{
|
||||
$explain = $user->lang(($this->type != CONFIRM_POST) ? 'CONFIRM_EXPLAIN' : 'POST_CONFIRM_EXPLAIN', '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
|
||||
$explain = $user->lang(($this->type != CONFIRM_POST) ? 'CONFIRM_EXPLAIN' : 'POST_CONFIRM_EXPLAIN', '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contactadmin') . '">', '</a>');
|
||||
|
||||
$template->assign_vars(array(
|
||||
'RECAPTCHA_SERVER' => $this->recaptcha_server,
|
||||
|
@@ -2818,8 +2818,8 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
$user->lang[$result['error_msg']],
|
||||
($config['email_enable']) ? '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') . '">' : '',
|
||||
($config['email_enable']) ? '</a>' : '',
|
||||
($config['board_contact']) ? '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">' : '',
|
||||
($config['board_contact']) ? '</a>' : ''
|
||||
'<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contactadmin') . '">',
|
||||
'</a>'
|
||||
);
|
||||
break;
|
||||
|
||||
@@ -2830,7 +2830,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
// Assign admin contact to some error messages
|
||||
if ($result['error_msg'] == 'LOGIN_ERROR_USERNAME' || $result['error_msg'] == 'LOGIN_ERROR_PASSWORD')
|
||||
{
|
||||
$err = (!$config['board_contact']) ? sprintf($user->lang[$result['error_msg']], '', '') : sprintf($user->lang[$result['error_msg']], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
|
||||
$err = sprintf($user->lang[$result['error_msg']], '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contactadmin') . '">', '</a>');
|
||||
}
|
||||
|
||||
break;
|
||||
|
@@ -39,7 +39,7 @@ abstract class phpbb_message_form
|
||||
|
||||
$this->errors = array();
|
||||
|
||||
$this->message = new phpbb_message($config['board_contact'], $config['server_name']);
|
||||
$this->message = new phpbb_message($config['server_name']);
|
||||
$this->message->set_sender_from_user($this->user);
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,6 @@ if (!defined('IN_PHPBB'))
|
||||
|
||||
class phpbb_message
|
||||
{
|
||||
protected $board_contact;
|
||||
protected $server_name;
|
||||
|
||||
protected $subject = '';
|
||||
@@ -36,9 +35,8 @@ class phpbb_message
|
||||
|
||||
protected $recipients;
|
||||
|
||||
public function __construct($board_contact, $server_name)
|
||||
public function __construct($server_name)
|
||||
{
|
||||
$this->board_contact = $board_contact;
|
||||
$this->server_name = $server_name;
|
||||
}
|
||||
|
||||
@@ -171,7 +169,7 @@ class phpbb_message
|
||||
$messenger->subject(htmlspecialchars_decode($this->subject));
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'BOARD_CONTACT' => $this->board_contact,
|
||||
'BOARD_CONTACT' => generate_board_url() . '/memberlist.' . $phpEx . '?mode=contactadmin',
|
||||
'TO_USERNAME' => htmlspecialchars_decode($recipient['to_name']),
|
||||
'FROM_USERNAME' => htmlspecialchars_decode($this->sender_name),
|
||||
'MESSAGE' => htmlspecialchars_decode($this->body))
|
||||
|
Reference in New Issue
Block a user