diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2012-09-14 16:24:50 -0500 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2012-09-14 16:24:50 -0500 |
commit | 1ab0c469e253df0e01f358a4a86e1b6df290d740 (patch) | |
tree | 1039a04e4df7bd59f622dd96f9f7ac448c5b5ff5 /phpBB/includes | |
parent | 40bc3b1f19af09f974e2c5bd6c113b78bcfe4f0b (diff) | |
download | forums-1ab0c469e253df0e01f358a4a86e1b6df290d740.tar forums-1ab0c469e253df0e01f358a4a86e1b6df290d740.tar.gz forums-1ab0c469e253df0e01f358a4a86e1b6df290d740.tar.bz2 forums-1ab0c469e253df0e01f358a4a86e1b6df290d740.tar.xz forums-1ab0c469e253df0e01f358a4a86e1b6df290d740.zip |
[ticket/11103] Delete notifications for PMs deleted by phpbb_delete_user_pms
PHPBB3-11103
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions_privmsgs.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index dbf5df787f..133b6fc9bc 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1146,6 +1146,7 @@ function delete_pm($user_id, $msg_ids, $folder_id) function phpbb_delete_user_pms($user_id) { global $db, $user, $phpbb_root_path, $phpEx; + global $phpbb_container; $user_id = (int) $user_id; @@ -1262,6 +1263,10 @@ function phpbb_delete_user_pms($user_id) WHERE folder_id = ' . PRIVMSGS_NO_BOX . ' AND ' . $db->sql_in_set('msg_id', $delivered_msg); $db->sql_query($sql); + + // Delete Notifications + $phpbb_notifications = $phpbb_container->get('notifications'); + $phpbb_notifications->delete_notifications('pm', $delivered_msg); } if (!empty($undelivered_msg)) @@ -1273,6 +1278,10 @@ function phpbb_delete_user_pms($user_id) $sql = 'DELETE FROM ' . PRIVMSGS_TABLE . ' WHERE ' . $db->sql_in_set('msg_id', $undelivered_msg); $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 . ' WHERE ' . $db->sql_in_set('msg_id', $delete_ids); $db->sql_query($sql); + + // Delete Notifications + $phpbb_notifications = $phpbb_container->get('notifications'); + $phpbb_notifications->delete_notifications('pm', $delete_ids); } } |