diff options
author | Nils Adermann <naderman@naderman.de> | 2011-06-07 03:46:38 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-05-29 02:14:28 +0200 |
commit | 389bc0b8dd5594a9f66c1026df408dfe73eb65b0 (patch) | |
tree | 5bf933be6fc4d6455a60005a7e1070b7e1b19979 | |
parent | d52f34f5ec5d006ec7e610e1c72266df21e70ac7 (diff) | |
download | forums-389bc0b8dd5594a9f66c1026df408dfe73eb65b0.tar forums-389bc0b8dd5594a9f66c1026df408dfe73eb65b0.tar.gz forums-389bc0b8dd5594a9f66c1026df408dfe73eb65b0.tar.bz2 forums-389bc0b8dd5594a9f66c1026df408dfe73eb65b0.tar.xz forums-389bc0b8dd5594a9f66c1026df408dfe73eb65b0.zip |
[ticket/10073] Replace board_contact mail with links to contact page
Error pages still contain the email address.
PHPBB3-10073
-rw-r--r-- | phpBB/includes/acp/acp_email.php | 2 | ||||
-rw-r--r-- | phpBB/includes/captcha/plugins/captcha_abstract.php | 2 | ||||
-rw-r--r-- | phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php | 4 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 6 | ||||
-rw-r--r-- | phpBB/includes/message/form.php | 2 | ||||
-rw-r--r-- | phpBB/includes/message/message.php | 6 | ||||
-rw-r--r-- | phpBB/memberlist.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/session.php | 6 |
8 files changed, 13 insertions, 17 deletions
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php index 63bfa3ac53..44489b90fe 100644 --- a/phpBB/includes/acp/acp_email.php +++ b/phpBB/includes/acp/acp_email.php @@ -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)) ); diff --git a/phpBB/includes/captcha/plugins/captcha_abstract.php b/phpBB/includes/captcha/plugins/captcha_abstract.php index dde3f9d4c9..cbf57cab9a 100644 --- a/phpBB/includes/captcha/plugins/captcha_abstract.php +++ b/phpBB/includes/captcha/plugins/captcha_abstract.php @@ -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, diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php index 0568cb7c51..f7078b49c0 100644 --- a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php @@ -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, diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 8ca966eb52..220f1ae21d 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -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; diff --git a/phpBB/includes/message/form.php b/phpBB/includes/message/form.php index 2da5406a63..13909e1938 100644 --- a/phpBB/includes/message/form.php +++ b/phpBB/includes/message/form.php @@ -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); } diff --git a/phpBB/includes/message/message.php b/phpBB/includes/message/message.php index b0948f940a..1e4f0f65d8 100644 --- a/phpBB/includes/message/message.php +++ b/phpBB/includes/message/message.php @@ -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)) diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index c81ee97cd7..fab9747cce 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -393,7 +393,7 @@ switch ($mode) $messenger->set_addresses($row); $messenger->assign_vars(array( - 'BOARD_CONTACT' => $config['board_contact'], + 'BOARD_CONTACT' => generate_board_url() . '/memberlist.' . $phpEx . '?mode=contactadmin', 'FROM_USERNAME' => htmlspecialchars_decode($user->data['username']), 'TO_USERNAME' => htmlspecialchars_decode($row['username']), 'MESSAGE' => htmlspecialchars_decode($message)) diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php index cfcb8e10a2..c35caf5047 100644 --- a/phpBB/phpbb/session.php +++ b/phpBB/phpbb/session.php @@ -1189,7 +1189,7 @@ class session if ($banned && !$return) { - global $template; + global $template, $phpbb_root_path, $phpEx; // If the session is empty we need to create a valid one... if (empty($this->session_id)) @@ -1210,8 +1210,6 @@ class session // We show a login box here to allow founders accessing the board if banned by IP if (defined('IN_LOGIN') && $this->data['user_id'] == ANONYMOUS) { - global $phpEx; - $this->setup('ucp'); $this->data['is_registered'] = $this->data['is_bot'] = false; @@ -1235,7 +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'; - $message = sprintf($this->lang[$message], $till_date, '<a href="mailto:' . $config['board_contact'] . '">', '</a>'); + $message = sprintf($this->lang[$message], $till_date, '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contactadmin') . '">', '</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>'; |