diff options
author | marcosbc <marcosbc> | 2014-05-10 16:36:11 +0200 |
---|---|---|
committer | marcosbc <marcosbc> | 2014-05-10 16:36:11 +0200 |
commit | 984ae598bebb63a4b3ffd55dd94334c2b1b30d6f (patch) | |
tree | 1567e8dcce7204850442474a9030a56adf7a74b6 /phpBB | |
parent | 867dc84c335bf959a8763c6dc90f8254f0ae80d8 (diff) | |
download | forums-984ae598bebb63a4b3ffd55dd94334c2b1b30d6f.tar forums-984ae598bebb63a4b3ffd55dd94334c2b1b30d6f.tar.gz forums-984ae598bebb63a4b3ffd55dd94334c2b1b30d6f.tar.bz2 forums-984ae598bebb63a4b3ffd55dd94334c2b1b30d6f.tar.xz forums-984ae598bebb63a4b3ffd55dd94334c2b1b30d6f.zip |
[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
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index c2bcb048b3..74e11e6990 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -578,7 +578,6 @@ class mcp_queue $redirect = reapply_sid($redirect); $success_msg = $post_url = ''; $approve_log = array(); - $topic_id_list = array(); $s_hidden_fields = build_hidden_fields(array( 'i' => $id, @@ -657,9 +656,12 @@ class mcp_queue if (!$post_data['topic_posts_approved']) { $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 { // Only add notifications, if we are not reapproving post @@ -669,12 +671,12 @@ class mcp_queue if ($post_data['post_visibility'] == ITEM_UNAPPROVED) { $phpbb_notifications->add_notifications(array( - 'quote', 'bookmark', 'post', ), $post_data); } } + $phpbb_notifications->add_notifications(array('quote'), $post_data); $phpbb_notifications->delete_notifications('post_in_queue', $post_id); $phpbb_notifications->mark_notifications_read(array( @@ -691,14 +693,16 @@ class mcp_queue continue; } - $phpbb_notifications->add_notifications('approve_post', $post_data); + if (!$post_data['topic_posts_approved']) + { + $phpbb_notifications->add_notifications('approve_post', $post_data); + } + else + { + $phpbb_notifications->add_notifications('approve_topic', $post_data); + } } } - - if (!empty($topic_id_list)) - { - self::approve_topics($action, $topic_id_list, $id, $mode); - } } meta_refresh(3, $redirect); |