1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-24 02:21:43 +02:00

[ticket/13713] Introduce notifications for mentions

PHPBB3-13713
This commit is contained in:
lavigor
2018-06-08 13:18:44 +03:00
committed by Marc Alexander
parent 9eef103e75
commit c70ac7eb62
10 changed files with 245 additions and 2 deletions

View File

@@ -575,6 +575,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
// Mark all topic notifications read for this user
$phpbb_notifications->mark_notifications(array(
'notification.type.topic',
'notification.type.mention',
'notification.type.quote',
'notification.type.bookmark',
'notification.type.post',
@@ -660,6 +661,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
$db->sql_freeresult($result);
$phpbb_notifications->mark_notifications_by_parent(array(
'notification.type.mention',
'notification.type.quote',
'notification.type.bookmark',
'notification.type.post',
@@ -771,6 +773,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
), $topic_id, $user->data['user_id'], $post_time);
$phpbb_notifications->mark_notifications_by_parent(array(
'notification.type.mention',
'notification.type.quote',
'notification.type.bookmark',
'notification.type.post',

View File

@@ -908,6 +908,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
// Notifications types to delete
$delete_notifications_types = array(
'notification.type.mention',
'notification.type.quote',
'notification.type.approve_post',
'notification.type.post_in_queue',

View File

@@ -2405,6 +2405,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
{
case 'post':
$phpbb_notifications->add_notifications(array(
'notification.type.mention',
'notification.type.quote',
'notification.type.topic',
), $notification_data);
@@ -2413,6 +2414,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
case 'reply':
case 'quote':
$phpbb_notifications->add_notifications(array(
'notification.type.mention',
'notification.type.quote',
'notification.type.bookmark',
'notification.type.post',
@@ -2432,6 +2434,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
}
$phpbb_notifications->update_notifications(array(
'notification.type.mention',
'notification.type.bookmark',
'notification.type.topic',
'notification.type.post',

View File

@@ -810,10 +810,14 @@ class mcp_queue
), $post_data);
}
}
$phpbb_notifications->add_notifications(array('notification.type.quote'), $post_data);
$phpbb_notifications->add_notifications(array(
'notification.type.mention',
'notification.type.quote',
), $post_data);
$phpbb_notifications->delete_notifications('notification.type.post_in_queue', $post_id);
$phpbb_notifications->mark_notifications(array(
'notification.type.mention',
'notification.type.quote',
'notification.type.bookmark',
'notification.type.post',
@@ -1045,12 +1049,13 @@ class mcp_queue
if ($topic_data['topic_visibility'] == ITEM_UNAPPROVED)
{
$phpbb_notifications->add_notifications(array(
'notification.type.mention',
'notification.type.quote',
'notification.type.topic',
), $topic_data);
}
$phpbb_notifications->mark_notifications('quote', $topic_data['post_id'], $user->data['user_id']);
$phpbb_notifications->mark_notifications(array('mention', 'quote'), $topic_data['post_id'], $user->data['user_id']);
$phpbb_notifications->mark_notifications('topic', $topic_id, $user->data['user_id']);
if ($notify_poster)