aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2013-02-28 18:53:23 -0500
committerDavid King <imkingdavid@gmail.com>2013-02-28 18:53:23 -0500
commit8200509c7940166d560c309c35b2ade2e4952f75 (patch)
tree5f4e89b1fe677520a4310754860a9c85511bb2b0 /phpBB/includes/functions_admin.php
parent1eead4da97635df35bfcdd6b1ce7ed71d9851d41 (diff)
parentecb9f44bf11756e1072354bfd658edfd4c01f74a (diff)
downloadforums-8200509c7940166d560c309c35b2ade2e4952f75.tar
forums-8200509c7940166d560c309c35b2ade2e4952f75.tar.gz
forums-8200509c7940166d560c309c35b2ade2e4952f75.tar.bz2
forums-8200509c7940166d560c309c35b2ade2e4952f75.tar.xz
forums-8200509c7940166d560c309c35b2ade2e4952f75.zip
Merge remote-tracking branch 'EXreaction/ticket/11103' into develop
# By Nathan Guse (169) and others # Via Nathan Guse (29) and Nathaniel Guse (7) * EXreaction/ticket/11103: (217 commits) [ticket/11103] Revert whitespace changes [ticket/11103] Few more minor language things [ticket/11103] Don't call generate_board_url many times [ticket/11103] Case time in queries as an int [ticket/11103] Fix effectively installed check [ticket/11103] Remove padding from notifications for now. [ticket/11103] Notifications Migration file [ticket/11103] Restore new/unread messages info/link in header (properly) [ticket/11103] Add newlines to bottom of css file [ticket/11103] HTML encode double arrow character [ticket/11103] Add Notification Settings link in flyout menu [ticket/11103] Restore new/unread messages info/link in header [ticket/11103] Update styling of UCP Notifications in subsilver2 [ticket/11103] Update styling of UCP Notifications in prosilver [ticket/11103] Update styling of subsilver2 notification modal [ticket/11103] Update styling of prosilver notification modal [ticket/11103] Remove title attribute from notification link [ticket/11103] Mark/Unmark All buttons [ticket/11103] Make the number of notifications strong if > 0 [ticket/11103] Rounded Corners and antialiased pointer ...
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 5529f2af46..baf107bcda 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -618,7 +618,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
*/
function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_sync = true, $call_delete_posts = true)
{
- global $db, $config;
+ global $db, $config, $phpbb_container;
$approved_topics = 0;
$forum_ids = $topic_ids = array();
@@ -715,6 +715,14 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
set_config_count('num_topics', $approved_topics * (-1), true);
}
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
+ $phpbb_notifications->delete_notifications(array(
+ 'topic',
+ 'approve_topic',
+ 'topic_in_queue',
+ ), $topic_ids);
+
return $return;
}
@@ -723,7 +731,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
*/
function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = true, $post_count_sync = true, $call_delete_topics = true)
{
- global $db, $config, $phpbb_root_path, $phpEx, $auth, $user;
+ global $db, $config, $phpbb_root_path, $phpEx, $auth, $user, $phpbb_container;
if ($where_type === 'range')
{
@@ -892,6 +900,16 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
delete_topics('topic_id', $remove_topics, $auto_sync, $post_count_sync, false);
}
+ $phpbb_notifications = $phpbb_container->get('notification_manager');
+
+ $phpbb_notifications->delete_notifications(array(
+ 'quote',
+ 'bookmark',
+ 'post',
+ 'approve_post',
+ 'post_in_queue',
+ ), $post_ids);
+
return sizeof($post_ids);
}