diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2012-09-15 14:33:15 -0500 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2012-09-15 14:33:15 -0500 |
commit | 7454d5c2d526f237bf24825b80edf6c9f1750fc6 (patch) | |
tree | 59ff36bf8d0ee581a1172a537ebb079dd058e3b1 /phpBB/includes/mcp/mcp_queue.php | |
parent | 05b573ebf76c737f89deaefd22ce963aa910e5d1 (diff) | |
download | forums-7454d5c2d526f237bf24825b80edf6c9f1750fc6.tar forums-7454d5c2d526f237bf24825b80edf6c9f1750fc6.tar.gz forums-7454d5c2d526f237bf24825b80edf6c9f1750fc6.tar.bz2 forums-7454d5c2d526f237bf24825b80edf6c9f1750fc6.tar.xz forums-7454d5c2d526f237bf24825b80edf6c9f1750fc6.zip |
[ticket/11103] Topic/Post in queue notification
Also, bug fixes and cleanup
PHPBB3-11103
Diffstat (limited to 'phpBB/includes/mcp/mcp_queue.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index bd2092e4bb..1d2caa38d5 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -606,6 +606,9 @@ function approve_post($post_id_list, $id, $mode) { if ($post_id == $post_data['topic_first_post_id'] && $post_id == $post_data['topic_last_post_id']) { + // Delete topic in queue notifications + $phpbb_notifications->delete_notifications(array('topic_in_queue'), $post_data['topic_id']); + // Forum Notifications $phpbb_notifications->add_notifications('topic', $post_data); @@ -617,6 +620,9 @@ function approve_post($post_id_list, $id, $mode) } else { + // Delete post in queue notification + $phpbb_notifications->delete_notifications(array('post_in_queue'), $post_id); + // Topic Notifications $phpbb_notifications->add_notifications(array('quote', 'bookmark', 'post'), $post_data); @@ -847,13 +853,26 @@ function disapprove_post($post_id_list, $id, $mode) } } + // Handle notifications (topic/post in queue) + $phpbb_notifications = $phpbb_container->get('notifications'); + foreach ($post_info as $post_id => $post_data) + { + if ($post_id == $post_data['topic_first_post_id'] && $post_id == $post_data['topic_last_post_id']) + { + $phpbb_notifications->delete_notifications(array('topic_in_queue'), $post_data['topic_id']); + } + else + { + $phpbb_notifications->delete_notifications(array('post_in_queue'), $post_id); + } + } + // Notify Poster? if ($notify_poster) { $lang_reasons = array(); // Handle notifications - $phpbb_notifications = $phpbb_container->get('notifications'); foreach ($post_info as $post_id => $post_data) { $post_data['disapprove_reason'] = ''; |