diff options
Diffstat (limited to 'phpBB/includes/functions_privmsgs.php')
-rw-r--r-- | phpBB/includes/functions_privmsgs.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 79f818caf2..838c6a0fec 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -918,10 +918,11 @@ function mark_folder_read($user_id, $folder_id) { global $db; - $sql = 'SELECT msg_id FROM ' . PRIVMSGS_TO_TABLE . " - WHERE folder_id = $folder_id - AND user_id = $user_id - AND pm_unread = 1"; + $sql = 'SELECT msg_id + FROM ' . PRIVMSGS_TO_TABLE . ' + WHERE folder_id = ' . ((int) $folder_id) . ' + AND user_id = ' . ((int) $user_id) . ' + AND pm_unread = 1'; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) |