mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/12270] No quote notif and double poster notification fix
Since a call was added to self::approve_topic(), the poster would get double-notified about it (even if it was later marked as read). Also, when creating a new topic with a quote, it would not be notified, this has also been fixed. PHPBB3-12270
This commit is contained in:
parent
867dc84c33
commit
984ae598be
1 changed files with 14 additions and 10 deletions
|
@ -578,7 +578,6 @@ class mcp_queue
|
||||||
$redirect = reapply_sid($redirect);
|
$redirect = reapply_sid($redirect);
|
||||||
$success_msg = $post_url = '';
|
$success_msg = $post_url = '';
|
||||||
$approve_log = array();
|
$approve_log = array();
|
||||||
$topic_id_list = array();
|
|
||||||
|
|
||||||
$s_hidden_fields = build_hidden_fields(array(
|
$s_hidden_fields = build_hidden_fields(array(
|
||||||
'i' => $id,
|
'i' => $id,
|
||||||
|
@ -657,9 +656,12 @@ class mcp_queue
|
||||||
if (!$post_data['topic_posts_approved'])
|
if (!$post_data['topic_posts_approved'])
|
||||||
{
|
{
|
||||||
$phpbb_notifications->delete_notifications('topic_in_queue', $post_data['topic_id']);
|
$phpbb_notifications->delete_notifications('topic_in_queue', $post_data['topic_id']);
|
||||||
$topic_id_list[] = $post_data['topic_id'];
|
|
||||||
|
if ($post_data['post_visibility'] == ITEM_UNAPPROVED)
|
||||||
|
{
|
||||||
|
$phpbb_notifications->add_notifications(array('topic'), $post_data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Send post notification only if a topic notification will not be sent.
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Only add notifications, if we are not reapproving post
|
// Only add notifications, if we are not reapproving post
|
||||||
|
@ -669,12 +671,12 @@ class mcp_queue
|
||||||
if ($post_data['post_visibility'] == ITEM_UNAPPROVED)
|
if ($post_data['post_visibility'] == ITEM_UNAPPROVED)
|
||||||
{
|
{
|
||||||
$phpbb_notifications->add_notifications(array(
|
$phpbb_notifications->add_notifications(array(
|
||||||
'quote',
|
|
||||||
'bookmark',
|
'bookmark',
|
||||||
'post',
|
'post',
|
||||||
), $post_data);
|
), $post_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$phpbb_notifications->add_notifications(array('quote'), $post_data);
|
||||||
$phpbb_notifications->delete_notifications('post_in_queue', $post_id);
|
$phpbb_notifications->delete_notifications('post_in_queue', $post_id);
|
||||||
|
|
||||||
$phpbb_notifications->mark_notifications_read(array(
|
$phpbb_notifications->mark_notifications_read(array(
|
||||||
|
@ -691,13 +693,15 @@ class mcp_queue
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$post_data['topic_posts_approved'])
|
||||||
|
{
|
||||||
$phpbb_notifications->add_notifications('approve_post', $post_data);
|
$phpbb_notifications->add_notifications('approve_post', $post_data);
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
|
|
||||||
if (!empty($topic_id_list))
|
|
||||||
{
|
{
|
||||||
self::approve_topics($action, $topic_id_list, $id, $mode);
|
$phpbb_notifications->add_notifications('approve_topic', $post_data);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue