diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-03-06 16:29:50 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-03-06 16:29:50 +0100 |
commit | 74a9ecfd24e745a0c0ad394bac915d121ea72278 (patch) | |
tree | 863ca7338758db3bc82dba43ebb1a3a7eaf7a5d1 /phpBB/includes/functions_posting.php | |
parent | 1a17a3854fa62e0fcdb018e1dcb53253b67ea8f1 (diff) | |
download | forums-74a9ecfd24e745a0c0ad394bac915d121ea72278.tar forums-74a9ecfd24e745a0c0ad394bac915d121ea72278.tar.gz forums-74a9ecfd24e745a0c0ad394bac915d121ea72278.tar.bz2 forums-74a9ecfd24e745a0c0ad394bac915d121ea72278.tar.xz forums-74a9ecfd24e745a0c0ad394bac915d121ea72278.zip |
[ticket/9657] Fix wrongly added notifications when post is posted softdeleted
The post/topic should not trigger "*_in_queue" notifications if it is
softdeleted, as it is not in the queue then.
PHPBB3-9657
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index f9dacae655..d2ff095e25 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -2214,7 +2214,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u break; } } - else + else if ($post_visibility == ITEM_UNAPPROVED) { switch ($mode) { @@ -2231,6 +2231,32 @@ 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']); + + $phpbb_notifications->delete_notifications(array( + 'quote', + 'bookmark', + 'post', + ), $data['post_id']); + break; + } + } + else if ($post_visibility == ITEM_DELETED) + { + switch ($mode) + { + case 'post': + case 'reply': + case 'quote': + // Nothing to do here + break; + + case 'edit_topic': + 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']); $phpbb_notifications->delete_notifications(array( |