diff options
author | Andreas Fischer <bantu@phpbb.com> | 2011-11-20 16:35:31 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2011-11-20 16:35:31 +0100 |
commit | 37c766819346b830cf184fdfae9407006a621b17 (patch) | |
tree | 5d0e134bf9c2b1b4ccecf574174e4fa9a1628286 /phpBB/includes | |
parent | a7077c91495521a8015a2e1dbbe587b2d97a8edc (diff) | |
download | forums-37c766819346b830cf184fdfae9407006a621b17.tar forums-37c766819346b830cf184fdfae9407006a621b17.tar.gz forums-37c766819346b830cf184fdfae9407006a621b17.tar.bz2 forums-37c766819346b830cf184fdfae9407006a621b17.tar.xz forums-37c766819346b830cf184fdfae9407006a621b17.zip |
[ticket/10446] Pass $config and $user via parameter to anti_abuse_headers().
PHPBB3-10446
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/acp/acp_email.php | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_inactive.php | 4 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_users.php | 4 | ||||
-rw-r--r-- | phpBB/includes/functions_messenger.php | 9 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_activate.php | 2 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_profile.php | 2 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_register.php | 2 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_resend.php | 4 |
8 files changed, 16 insertions, 13 deletions
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php index 29d6903691..df0d44c0c5 100644 --- a/phpBB/includes/acp/acp_email.php +++ b/phpBB/includes/acp/acp_email.php @@ -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); diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php index a4b2a3ca2f..f3f332d707 100644 --- a/phpBB/includes/acp/acp_inactive.php +++ b/phpBB/includes/acp/acp_inactive.php @@ -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']), diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 590103d519..4f58434a43 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -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'])) diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 9087b1c8aa..91b361183c 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -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'])); diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php index a1468895a9..82c1937919 100644 --- a/phpBB/includes/ucp/ucp_activate.php +++ b/phpBB/includes/ucp/ucp_activate.php @@ -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'])) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 03a0e3d746..d35d13b6c1 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -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']), diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index e3e719d63c..4e8729db56 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -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'])), diff --git a/phpBB/includes/ucp/ucp_resend.php b/phpBB/includes/ucp/ucp_resend.php index c1f9effb01..4d181dba49 100644 --- a/phpBB/includes/ucp/ucp_resend.php +++ b/phpBB/includes/ucp/ucp_resend.php @@ -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']), |