mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
[ticket/11449] Add separate method for deleting notifications by multiple types
PHPBB3-11449
This commit is contained in:
@@ -894,11 +894,11 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
$phpbb_notifications->delete_notifications(array(
|
||||
$phpbb_notifications->delete_notifications_by_types([
|
||||
'notification.type.topic',
|
||||
'notification.type.approve_topic',
|
||||
'notification.type.topic_in_queue',
|
||||
), $topic_ids);
|
||||
], $topic_ids);
|
||||
|
||||
return $return;
|
||||
}
|
||||
@@ -1185,7 +1185,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
$phpbb_notifications->delete_notifications($delete_notifications_types, $post_ids);
|
||||
$phpbb_notifications->delete_notifications_by_types($delete_notifications_types, $post_ids);
|
||||
|
||||
return count($post_ids);
|
||||
}
|
||||
|
Reference in New Issue
Block a user