mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/11103] Ability to query data before running create_insert_array()
Mark post/topic in queue notifications read when visiting mcp Change post/topic in queue notification url to use MCP. Fix the bug: Approving a topic marks the topic as read, but before the notification is created for the user approving the topic (if they would get a notification that the topic has been made). This causes it to be stuck "unread". PHPBB3-11103
This commit is contained in:
@@ -34,6 +34,7 @@ class mcp_queue
|
||||
{
|
||||
global $auth, $db, $user, $template, $cache;
|
||||
global $config, $phpbb_root_path, $phpEx, $action;
|
||||
global $phpbb_notifications;
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
|
||||
@@ -84,6 +85,9 @@ class mcp_queue
|
||||
if (isset($topic_info[$topic_id]['topic_first_post_id']))
|
||||
{
|
||||
$post_id = (int) $topic_info[$topic_id]['topic_first_post_id'];
|
||||
|
||||
// Mark the notification as read
|
||||
$phpbb_notifications->mark_notifications_read('topic_in_queue', $topic_id, $user->data['user_id']);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -91,6 +95,9 @@ class mcp_queue
|
||||
}
|
||||
}
|
||||
|
||||
// Mark the notification as read
|
||||
$phpbb_notifications->mark_notifications_read('post_in_queue', $post_id, $user->data['user_id']);
|
||||
|
||||
$post_info = get_post_data(array($post_id), 'm_approve', true);
|
||||
|
||||
if (!sizeof($post_info))
|
||||
|
Reference in New Issue
Block a user