diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-05-22 02:24:31 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-05-22 02:24:31 +0200 |
commit | ee875c0a43ac734d1693cdd7393c8f4277233426 (patch) | |
tree | e605a18d35354323d6b7968f983c5c1200b4df67 /phpBB/includes | |
parent | 86fa185a1ba4754b6c2dc9769b826aa9d57aa148 (diff) | |
download | forums-ee875c0a43ac734d1693cdd7393c8f4277233426.tar forums-ee875c0a43ac734d1693cdd7393c8f4277233426.tar.gz forums-ee875c0a43ac734d1693cdd7393c8f4277233426.tar.bz2 forums-ee875c0a43ac734d1693cdd7393c8f4277233426.tar.xz forums-ee875c0a43ac734d1693cdd7393c8f4277233426.zip |
[ticket/10790] Remove a (kind of) dead code section from submit_pm().
The type of $user->data['user_id'] is (almost) guranteed to be integer
since session::session_create() casts it to integer.
The type of $row['user_id'] is only an integer if the DB driver adjusts the
PHP type according to the DB type. This is only done by some of our
not-so-popular DB drivers and is not the case for MySQL.
As such this comparison is (almost) never true and a PM is also sent to the
author itself when it is sent to a group the author is also a member of.
Since this behaviour seems to have been accepted by the communty, the dead
code is removed and current behaviour is kept.
Also, checking this in the loop seems to be a rather bad idea.
Introduced by 78b1c4caaa17cc8760b685ad41c19f15f9d89b68.
PHPBB3-10790
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions_privmsgs.php | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index d2fce000aa..261ed45727 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1522,12 +1522,6 @@ 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; } |