diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2009-07-27 15:05:59 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-07-27 15:05:59 +0000 |
| commit | 78b1c4caaa17cc8760b685ad41c19f15f9d89b68 (patch) | |
| tree | 4213ba662068ea4cfabf890a2d11066827473b0c /phpBB/includes | |
| parent | 919d42d02dc46b11f011b8e5073720579aad6615 (diff) | |
| download | forums-78b1c4caaa17cc8760b685ad41c19f15f9d89b68.tar forums-78b1c4caaa17cc8760b685ad41c19f15f9d89b68.tar.gz forums-78b1c4caaa17cc8760b685ad41c19f15f9d89b68.tar.bz2 forums-78b1c4caaa17cc8760b685ad41c19f15f9d89b68.tar.xz forums-78b1c4caaa17cc8760b685ad41c19f15f9d89b68.zip | |
Do not send private message back to sender if sender is in the same group the private message was sent to.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9876 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/functions_privmsgs.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 883d8ff13f..b201329b20 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1356,6 +1356,12 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true) while ($row = $db->sql_fetchrow($result)) { + // Additionally, do not include the sender if he is in the group he wants to send to. ;) + if ($row['user_id'] === $user->data['user_id']) + { + continue; + } + $field = ($data['address_list']['g'][$row['group_id']] == 'to') ? 'to' : 'bcc'; $recipients[$row['user_id']] = $field; } @@ -1901,7 +1907,7 @@ function get_recipient_strings($pm_by_id) foreach ($pm_by_id as $message_id => $row) { $address[$message_id] = rebuild_header(array('to' => $row['to_address'], 'bcc' => $row['bcc_address'])); - + foreach ($_types as $ug_type) { if (isset($address[$message_id][$ug_type]) && sizeof($address[$message_id][$ug_type])) |
