1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 00:07:44 +02:00

[ticket/15540] Refactor search backend classes to Symfony services

PHPBB3-15540
This commit is contained in:
Ruben Calvo
2018-11-07 06:21:46 +00:00
committed by rubencm
parent 271d6d3169
commit 2aabf560b4
36 changed files with 567 additions and 522 deletions

View File

@@ -904,7 +904,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, $phpbb_container, $phpbb_dispatcher;
global $db, $config, $phpbb_container, $phpbb_dispatcher;
// Notifications types to delete
$delete_notifications_types = array(
@@ -1086,20 +1086,8 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
}
// Remove the message from the search index
$search_type = $config['search_type'];
if (!class_exists($search_type))
{
trigger_error('NO_SUCH_SEARCH_MODULE');
}
$error = false;
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);
if ($error)
{
trigger_error($error);
}
$search_backend_factory = $phpbb_container->get('search.backend_factory');
$search = $search_backend_factory->get_active();
$search->index_remove($post_ids, $poster_ids, $forum_ids);