mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 14:57:37 +02:00
[ticket/11103] Mark topic/post subscription notification read when approved
PHPBB3-11103
This commit is contained in:
@@ -615,7 +615,13 @@ function approve_post($post_id_list, $id, $mode)
|
||||
{
|
||||
$phpbb_notifications->delete_notifications('topic_in_queue', $post_data['topic_id']);
|
||||
|
||||
$phpbb_notifications->add_notifications('topic', $post_data);
|
||||
$phpbb_notifications->add_notifications(array(
|
||||
'quote',
|
||||
'topic',
|
||||
), $post_data);
|
||||
|
||||
$phpbb_notifications->mark_notifications_read('quote', $post_data['post_id'], $user->data['user_id']);
|
||||
$phpbb_notifications->mark_notifications_read('topic', $post_data['topic_id'], $user->data['user_id']);
|
||||
|
||||
if ($notify_poster)
|
||||
{
|
||||
@@ -632,6 +638,12 @@ function approve_post($post_id_list, $id, $mode)
|
||||
'post',
|
||||
), $post_data);
|
||||
|
||||
$phpbb_notifications->mark_notifications_read(array(
|
||||
'quote',
|
||||
'bookmark',
|
||||
'post',
|
||||
),$post_data['post_id'], $user->data['user_id']);
|
||||
|
||||
if ($notify_poster)
|
||||
{
|
||||
$phpbb_notifications->add_notifications('approve_post', $post_data);
|
||||
|
@@ -226,16 +226,6 @@ class phpbb_notification_manager
|
||||
*/
|
||||
public function mark_notifications_read($item_type, $item_id, $user_id, $time = false)
|
||||
{
|
||||
if (is_array($item_type))
|
||||
{
|
||||
foreach ($item_type as $type)
|
||||
{
|
||||
$this->mark_notifications_read($type, $item_id, $user_id, $time);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$time = ($time !== false) ? $time : time();
|
||||
|
||||
$sql = 'UPDATE ' . $this->notifications_table . "
|
||||
|
Reference in New Issue
Block a user