mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/11772] Do not send out new topic/post notifications when reapproving
Only add notifications, if we are not reapproving post When the topic was already approved, but was edited and now needs re-approval, we don't want to notify the users again. PHPBB3-11772
This commit is contained in:
parent
2ec9c08a2b
commit
5512e62c3c
1 changed files with 24 additions and 9 deletions
|
@ -660,11 +660,18 @@ class mcp_queue
|
|||
}
|
||||
$phpbb_notifications->delete_notifications('post_in_queue', $post_id);
|
||||
|
||||
$phpbb_notifications->add_notifications(array(
|
||||
'quote',
|
||||
'bookmark',
|
||||
'post',
|
||||
), $post_data);
|
||||
// Only add notifications, if we are not reapproving post
|
||||
// When the topic was already approved, but was edited and
|
||||
// now needs re-approval, we don't want to notify the users
|
||||
// again.
|
||||
if ($post_data['post_visibility'] == ITEM_UNAPPROVED)
|
||||
{
|
||||
$phpbb_notifications->add_notifications(array(
|
||||
'quote',
|
||||
'bookmark',
|
||||
'post',
|
||||
), $post_data);
|
||||
}
|
||||
|
||||
$phpbb_notifications->mark_notifications_read(array(
|
||||
'quote',
|
||||
|
@ -832,10 +839,18 @@ class mcp_queue
|
|||
));
|
||||
|
||||
$phpbb_notifications->delete_notifications('topic_in_queue', $topic_id);
|
||||
$phpbb_notifications->add_notifications(array(
|
||||
'quote',
|
||||
'topic',
|
||||
), $topic_data);
|
||||
|
||||
// Only add notifications, if we are not reapproving post
|
||||
// When the topic was already approved, but was edited and
|
||||
// now needs re-approval, we don't want to notify the users
|
||||
// again.
|
||||
if ($topic_data['topic_visibility'] == ITEM_UNAPPROVED)
|
||||
{
|
||||
$phpbb_notifications->add_notifications(array(
|
||||
'quote',
|
||||
'topic',
|
||||
), $topic_data);
|
||||
}
|
||||
|
||||
$phpbb_notifications->mark_notifications_read('quote', $topic_data['post_id'], $user->data['user_id']);
|
||||
$phpbb_notifications->mark_notifications_read('topic', $topic_id, $user->data['user_id']);
|
||||
|
|
Loading…
Add table
Reference in a new issue