mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/13205] Add a mark all messages read link to PM folders
PHPBB3-13205
This commit is contained in:
@@ -914,6 +914,23 @@ 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 = $folder_id
|
||||
AND user_id = $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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user