diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-04-07 19:13:32 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-04-07 19:13:32 +0200 |
commit | 3315702b5f2feacbc703f5dcee5944f89cf2d407 (patch) | |
tree | d6ca04bee2c99f9e6bcd09e913c23a9c321a5bf0 /phpBB/includes | |
parent | f0176b53934e78b830b890ef46c1e8e7c233bee4 (diff) | |
download | forums-3315702b5f2feacbc703f5dcee5944f89cf2d407.tar forums-3315702b5f2feacbc703f5dcee5944f89cf2d407.tar.gz forums-3315702b5f2feacbc703f5dcee5944f89cf2d407.tar.bz2 forums-3315702b5f2feacbc703f5dcee5944f89cf2d407.tar.xz forums-3315702b5f2feacbc703f5dcee5944f89cf2d407.zip |
[ticket/12370] Do not delete topic notifications when the topic is visible
We should only delete the topic notifications, when the topic is not approved
anymore. This happens, when the post was the last approved but is now
unapproved because the user is on queue, or when it has been softdeleted while
editing.
PHPBB3-12370
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions_posting.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 6a0aedf8c6..79fcb892ef 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -2272,8 +2272,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u case 'edit_first_post': case 'edit': case 'edit_last_post': - // @todo: Check whether these notification deletions are correct - $phpbb_notifications->delete_notifications('topic', $data['topic_id']); + if ($data['topic_visibility'] != ITEM_APPROVED) + { + $phpbb_notifications->delete_notifications('topic', $data['topic_id']); + } $phpbb_notifications->delete_notifications(array( 'quote', @@ -2297,8 +2299,10 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u case 'edit_first_post': case 'edit': case 'edit_last_post': - // @todo: Check whether these notification deletions are correct - $phpbb_notifications->delete_notifications('topic', $data['topic_id']); + if ($data['topic_visibility'] != ITEM_APPROVED) + { + $phpbb_notifications->delete_notifications('topic', $data['topic_id']); + } $phpbb_notifications->delete_notifications(array( 'quote', |