mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-29 06:38:52 +00:00
[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
This commit is contained in:
parent
1a17a3854f
commit
74a9ecfd24
1 changed files with 27 additions and 1 deletions
|
@ -2214,7 +2214,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if ($post_visibility == ITEM_UNAPPROVED)
|
||||||
{
|
{
|
||||||
switch ($mode)
|
switch ($mode)
|
||||||
{
|
{
|
||||||
|
@ -2231,6 +2231,32 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||||
case 'edit_first_post':
|
case 'edit_first_post':
|
||||||
case 'edit':
|
case 'edit':
|
||||||
case 'edit_last_post':
|
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('topic', $data['topic_id']);
|
||||||
|
|
||||||
$phpbb_notifications->delete_notifications(array(
|
$phpbb_notifications->delete_notifications(array(
|
||||||
|
|
Loading…
Add table
Reference in a new issue