diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-04-11 12:28:14 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-04-25 11:52:19 +0200 |
commit | 92db22c8827abfad8615b0537fdc6fd89ab4203f (patch) | |
tree | a1d2e6357844c3f209e43ba074ecf46c9eb0f8bd /phpBB/includes/functions_posting.php | |
parent | e0fadfb4d675df71b359b5d64b614051dda4017e (diff) | |
download | forums-92db22c8827abfad8615b0537fdc6fd89ab4203f.tar forums-92db22c8827abfad8615b0537fdc6fd89ab4203f.tar.gz forums-92db22c8827abfad8615b0537fdc6fd89ab4203f.tar.bz2 forums-92db22c8827abfad8615b0537fdc6fd89ab4203f.tar.xz forums-92db22c8827abfad8615b0537fdc6fd89ab4203f.zip |
[ticket/12371] Do not delete post related notifications when a post is deleted
When a post is marked edited and therefor marked as softdeleted/unapproved,
we should not delete the notifications, just like we can't delete the emails.
Links are out there anyway and just keeping the notification is fail save.
If we keep the notification we can just continue to update it when more posts
are added. Also when we delete a post, we don't have to go though the table
and find all related notifications to be able to delete them or even update
them, when they have responders set.
PHPBB3-12371
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 51bbcb8bae..ebd2d77887 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -2272,16 +2272,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u case 'edit_first_post': case 'edit': case 'edit_last_post': - if ($data['topic_visibility'] != ITEM_APPROVED) - { - $phpbb_notifications->delete_notifications('topic', $data['topic_id']); - } - - $phpbb_notifications->delete_notifications(array( - 'quote', - 'bookmark', - 'post', - ), $data['post_id']); + // Nothing to do here break; } } @@ -2292,23 +2283,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u case 'post': case 'reply': case 'quote': - // Nothing to do here - break; - case 'edit_topic': case 'edit_first_post': case 'edit': case 'edit_last_post': - if ($data['topic_visibility'] != ITEM_APPROVED) - { - $phpbb_notifications->delete_notifications('topic', $data['topic_id']); - } - - $phpbb_notifications->delete_notifications(array( - 'quote', - 'bookmark', - 'post', - ), $data['post_id']); + // Nothing to do here break; } } |