mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-06 15:45:34 +02:00
[ticket/11103] Delete notifications for PMs deleted by phpbb_delete_user_pms
PHPBB3-11103
This commit is contained in:
parent
40bc3b1f19
commit
1ab0c469e2
@ -1146,6 +1146,7 @@ function delete_pm($user_id, $msg_ids, $folder_id)
|
|||||||
function phpbb_delete_user_pms($user_id)
|
function phpbb_delete_user_pms($user_id)
|
||||||
{
|
{
|
||||||
global $db, $user, $phpbb_root_path, $phpEx;
|
global $db, $user, $phpbb_root_path, $phpEx;
|
||||||
|
global $phpbb_container;
|
||||||
|
|
||||||
$user_id = (int) $user_id;
|
$user_id = (int) $user_id;
|
||||||
|
|
||||||
@ -1262,6 +1263,10 @@ function phpbb_delete_user_pms($user_id)
|
|||||||
WHERE folder_id = ' . PRIVMSGS_NO_BOX . '
|
WHERE folder_id = ' . PRIVMSGS_NO_BOX . '
|
||||||
AND ' . $db->sql_in_set('msg_id', $delivered_msg);
|
AND ' . $db->sql_in_set('msg_id', $delivered_msg);
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
// Delete Notifications
|
||||||
|
$phpbb_notifications = $phpbb_container->get('notifications');
|
||||||
|
$phpbb_notifications->delete_notifications('pm', $delivered_msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($undelivered_msg))
|
if (!empty($undelivered_msg))
|
||||||
@ -1273,6 +1278,10 @@ function phpbb_delete_user_pms($user_id)
|
|||||||
$sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
|
$sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
|
||||||
WHERE ' . $db->sql_in_set('msg_id', $undelivered_msg);
|
WHERE ' . $db->sql_in_set('msg_id', $undelivered_msg);
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
// Delete Notifications
|
||||||
|
$phpbb_notifications = $phpbb_container->get('notifications');
|
||||||
|
$phpbb_notifications->delete_notifications('pm', $undelivered_msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1315,6 +1324,10 @@ function phpbb_delete_user_pms($user_id)
|
|||||||
$sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
|
$sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
|
||||||
WHERE ' . $db->sql_in_set('msg_id', $delete_ids);
|
WHERE ' . $db->sql_in_set('msg_id', $delete_ids);
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
// Delete Notifications
|
||||||
|
$phpbb_notifications = $phpbb_container->get('notifications');
|
||||||
|
$phpbb_notifications->delete_notifications('pm', $delete_ids);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user