diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2014-10-22 17:42:51 -0500 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2014-10-22 17:42:51 -0500 |
| commit | 378fef022fef27d95a3b25d230e80cbea96ad104 (patch) | |
| tree | 15758d2c6e5374a7e8817117293b65e83f26bbd6 /phpBB/includes/functions_privmsgs.php | |
| parent | 00c57ed122d741a2166188b6158852be401d5299 (diff) | |
| parent | 6a0727acdcf8c30b9fdf5df838ab3decc0b1a228 (diff) | |
| download | forums-378fef022fef27d95a3b25d230e80cbea96ad104.tar forums-378fef022fef27d95a3b25d230e80cbea96ad104.tar.gz forums-378fef022fef27d95a3b25d230e80cbea96ad104.tar.bz2 forums-378fef022fef27d95a3b25d230e80cbea96ad104.tar.xz forums-378fef022fef27d95a3b25d230e80cbea96ad104.zip | |
Merge branch 'develop-ascraeus' into develop
Diffstat (limited to 'phpBB/includes/functions_privmsgs.php')
| -rw-r--r-- | phpBB/includes/functions_privmsgs.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index ad142b1cca..838c6a0fec 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -914,6 +914,24 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id) } } +function mark_folder_read($user_id, $folder_id) +{ + global $db; + + $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)) + { + update_unread_status(true, $row['msg_id'], $user_id, $folder_id); + } + $db->sql_freeresult($result); +} + /** * Handle all actions possible with marked messages */ |
