1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-29 12:43:15 +01:00

[ticket/10446] Pass $config and $user via parameter to anti_abuse_headers().

PHPBB3-10446
This commit is contained in:
Andreas Fischer 2011-11-20 16:35:31 +01:00
parent a7077c9149
commit 37c7668193
10 changed files with 18 additions and 15 deletions

View File

@ -195,7 +195,7 @@ class acp_email
$messenger->template('admin_send_email', $used_lang);
$messenger->anti_abuse_headers();
$messenger->anti_abuse_headers($config, $user);
$messenger->subject(htmlspecialchars_decode($subject));
$messenger->set_mail_priority($priority);

View File

@ -118,7 +118,7 @@ class acp_inactive
$messenger->to($row['user_email'], $row['username']);
$messenger->anti_abuse_headers();
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($row['username']))
@ -206,7 +206,7 @@ class acp_inactive
$messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']);
$messenger->anti_abuse_headers();
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($row['username']),

View File

@ -348,7 +348,7 @@ class acp_users
$messenger->to($user_row['user_email'], $user_row['username']);
$messenger->anti_abuse_headers();
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
'WELCOME_MSG' => htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename'])),
@ -403,7 +403,7 @@ class acp_users
$messenger->to($user_row['user_email'], $user_row['username']);
$messenger->anti_abuse_headers();
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($user_row['username']))

View File

@ -164,11 +164,14 @@ class messenger
/**
* Adds X-AntiAbuse headers
*
* @param array $config Configuration array
* @param user $user A user object
*
* @return null
*/
function anti_abuse_headers()
function anti_abuse_headers($config, $user)
{
global $config, $user;
$this->headers('X-AntiAbuse: Board servername - ' . mail_encode($config['server_name']));
$this->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
$this->headers('X-AntiAbuse: Username - ' . mail_encode($user->data['username']));

View File

@ -117,7 +117,7 @@ class ucp_activate
$messenger->to($user_row['user_email'], $user_row['username']);
$messenger->anti_abuse_headers();
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($user_row['username']))

View File

@ -150,7 +150,7 @@ class ucp_profile
$messenger->to($data['email'], $data['username']);
$messenger->anti_abuse_headers();
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($data['username']),

View File

@ -366,7 +366,7 @@ class ucp_register
$messenger->to($data['email'], $data['username']);
$messenger->anti_abuse_headers();
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
'WELCOME_MSG' => htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename'])),

View File

@ -94,7 +94,7 @@ class ucp_resend
$messenger->template(($coppa) ? 'coppa_resend_inactive' : 'user_resend_inactive', $user_row['user_lang']);
$messenger->to($user_row['user_email'], $user_row['username']);
$messenger->anti_abuse_headers();
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
'WELCOME_MSG' => htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename'])),
@ -130,7 +130,7 @@ class ucp_resend
$messenger->to($row['user_email'], $row['username']);
$messenger->im($row['user_jabber'], $row['username']);
$messenger->anti_abuse_headers();
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($user_row['username']),

View File

@ -1945,7 +1945,7 @@ class install_install extends module
$messenger->to($data['board_email1'], $data['admin_name']);
$messenger->anti_abuse_headers();
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($data['admin_name']),

View File

@ -899,7 +899,7 @@ switch ($mode)
$notify_type = NOTIFY_EMAIL;
}
$messenger->anti_abuse_headers();
$messenger->anti_abuse_headers($config, $user);
$messenger->assign_vars(array(
'BOARD_CONTACT' => $config['board_contact'],