mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-05 07:07:51 +02:00
[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
This commit is contained in:
parent
f0176b5393
commit
3315702b5f
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user