diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 2cc0b05e38..23db9c780c 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -178,6 +178,7 @@
  • [Fix] Display "Locked" button instead of "Reply" one for locked forum in viewtopic (prosilver). (Bug #38055 - Patch by Raimon)
  • [Fix] Correctly propagate umlauts over search result pages (Bug #33755)
  • [Fix] Preserve post options when refusing to save the post as a draft. (Bug #39115)
  • +
  • [Fix] Do not send private message back to sender if sender is in the same group the private message was sent to.
  • [Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.
  • [Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)
  • [Change] Template engine now permits to a limited extent variable includes.
  • 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]))