diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2012-10-12 16:54:42 -0500 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2012-10-12 16:54:42 -0500 |
commit | 3d79ce28031b4c85ee34bd4d43f0c64b18b1a80b (patch) | |
tree | b6a440791b0ea08e5d91246ee5a2ab352ae260e6 /phpBB/includes/mcp/mcp_queue.php | |
parent | 8b2f1127e4167e241c41f8709964c203e401de94 (diff) | |
download | forums-3d79ce28031b4c85ee34bd4d43f0c64b18b1a80b.tar forums-3d79ce28031b4c85ee34bd4d43f0c64b18b1a80b.tar.gz forums-3d79ce28031b4c85ee34bd4d43f0c64b18b1a80b.tar.bz2 forums-3d79ce28031b4c85ee34bd4d43f0c64b18b1a80b.tar.xz forums-3d79ce28031b4c85ee34bd4d43f0c64b18b1a80b.zip |
[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
Diffstat (limited to 'phpBB/includes/mcp/mcp_queue.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 77e778fc38..b23e5f4e45 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -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)) |