diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-04-11 14:26:55 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-04-25 11:52:22 +0200 |
commit | 5512e62c3c436215de6db0b45c693308e1b6dfed (patch) | |
tree | 6542d387a03aa3ba99570eb9bf2f72c4fe9bb552 /phpBB/includes/mcp/mcp_queue.php | |
parent | 2ec9c08a2bce2cb83c68339d2d07039cabc44d68 (diff) | |
download | forums-5512e62c3c436215de6db0b45c693308e1b6dfed.tar forums-5512e62c3c436215de6db0b45c693308e1b6dfed.tar.gz forums-5512e62c3c436215de6db0b45c693308e1b6dfed.tar.bz2 forums-5512e62c3c436215de6db0b45c693308e1b6dfed.tar.xz forums-5512e62c3c436215de6db0b45c693308e1b6dfed.zip |
[ticket/11772] Do not send out new topic/post notifications when reapproving
Only add notifications, if we are not reapproving post
When the topic was already approved, but was edited and
now needs re-approval, we don't want to notify the users again.
PHPBB3-11772
Diffstat (limited to 'phpBB/includes/mcp/mcp_queue.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 3b1081c5c7..2cbb0b03f6 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -660,11 +660,18 @@ class mcp_queue } $phpbb_notifications->delete_notifications('post_in_queue', $post_id); - $phpbb_notifications->add_notifications(array( - 'quote', - 'bookmark', - 'post', - ), $post_data); + // Only add notifications, if we are not reapproving post + // When the topic was already approved, but was edited and + // now needs re-approval, we don't want to notify the users + // again. + if ($post_data['post_visibility'] == ITEM_UNAPPROVED) + { + $phpbb_notifications->add_notifications(array( + 'quote', + 'bookmark', + 'post', + ), $post_data); + } $phpbb_notifications->mark_notifications_read(array( 'quote', @@ -832,10 +839,18 @@ class mcp_queue )); $phpbb_notifications->delete_notifications('topic_in_queue', $topic_id); - $phpbb_notifications->add_notifications(array( - 'quote', - 'topic', - ), $topic_data); + + // Only add notifications, if we are not reapproving post + // When the topic was already approved, but was edited and + // now needs re-approval, we don't want to notify the users + // again. + if ($topic_data['topic_visibility'] == ITEM_UNAPPROVED) + { + $phpbb_notifications->add_notifications(array( + 'quote', + 'topic', + ), $topic_data); + } $phpbb_notifications->mark_notifications_read('quote', $topic_data['post_id'], $user->data['user_id']); $phpbb_notifications->mark_notifications_read('topic', $topic_id, $user->data['user_id']); |