diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-25 16:10:57 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-25 16:10:57 +0000 |
commit | 30a0cf29fbc971e04f62be9ef12da3e03327d5d5 (patch) | |
tree | aa11be3a03ef846a15c18fadc86d7471b10f72ef /phpBB/includes/functions_privmsgs.php | |
parent | 80e28a2db7d7167f24d938390d4907ed0081a65c (diff) | |
download | forums-30a0cf29fbc971e04f62be9ef12da3e03327d5d5.tar forums-30a0cf29fbc971e04f62be9ef12da3e03327d5d5.tar.gz forums-30a0cf29fbc971e04f62be9ef12da3e03327d5d5.tar.bz2 forums-30a0cf29fbc971e04f62be9ef12da3e03327d5d5.tar.xz forums-30a0cf29fbc971e04f62be9ef12da3e03327d5d5.zip |
do not ask why i put the pm table there instead of the polls. :o
- remove forum description from title tag (now it's able to hold bbcode etc. resulting in broken layout)
git-svn-id: file:///svn/phpbb/trunk@5721 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_privmsgs.php')
-rw-r--r-- | phpBB/includes/functions_privmsgs.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 9105c09c52..3442e2fcc6 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1111,12 +1111,20 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr { foreach ($data['address_list'][$ug_type] as $id => $field) { + $id = (int) $id; + + // Do not rely on the address list being "valid" + if (!$id) + { + continue; + } + $field = ($field == 'to') ? 'to' : 'bcc'; if ($ug_type == 'u') { $recipients[$id] = $field; } - ${$field}[] = $ug_type . '_' . (int) $id; + ${$field}[] = $ug_type . '_' . $id; } } } @@ -1229,9 +1237,9 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr foreach ($recipients as $user_id => $type) { $sql_ary[] = array( - 'msg_id' => $data['msg_id'], - 'user_id' => $user_id, - 'author_id' => $data['from_user_id'], + 'msg_id' => (int) $data['msg_id'], + 'user_id' => (int) $user_id, + 'author_id' => (int) $data['from_user_id'], 'folder_id' => PRIVMSGS_NO_BOX, 'new' => 1, 'unread' => 1, |