From: Meik S. <acy...@ph...> - 2009-07-27 15:06:20
|
Author: acydburn Date: Mon Jul 27 16:05:59 2009 New Revision: 9876 Log: Do not send private message back to sender if sender is in the same group the private message was sent to. Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html branches/phpBB-3_0_0/phpBB/includes/functions_privmsgs.php Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html (original) --- branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html Mon Jul 27 16:05:59 2009 *************** *** 178,183 **** --- 178,184 ---- <li>[Fix] Display "Locked" button instead of "Reply" one for locked forum in viewtopic (prosilver). (Bug #38055 - Patch by Raimon)</li> <li>[Fix] Correctly propagate umlauts over search result pages (Bug #33755)</li> <li>[Fix] Preserve post options when refusing to save the post as a draft. (Bug #39115)</li> + <li>[Fix] Do not send private message back to sender if sender is in the same group the private message was sent to.</li> <li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li> <li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li> <li>[Change] Template engine now permits to a limited extent variable includes.</li> Modified: branches/phpBB-3_0_0/phpBB/includes/functions_privmsgs.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/functions_privmsgs.php (original) --- branches/phpBB-3_0_0/phpBB/includes/functions_privmsgs.php Mon Jul 27 16:05:59 2009 *************** *** 1356,1361 **** --- 1356,1367 ---- 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,1907 **** 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])) --- 1907,1913 ---- 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])) |