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

[ticket/12683] Remove check to avoid index twice (ticket 16755)

PHPBB3-12683
This commit is contained in:
rubencm
2021-04-10 17:53:06 +02:00
committed by Ruben Calvo
parent 1cef5f83a0
commit 9a6d42770e
11 changed files with 13 additions and 123 deletions

View File

@@ -16,8 +16,6 @@ namespace phpbb\search\backend;
use phpbb\cache\service;
use phpbb\config\config;
use phpbb\db\driver\driver_interface;
use phpbb\search\exception\index_created_exception;
use phpbb\search\exception\index_empty_exception;
use phpbb\user;
/**
@@ -332,11 +330,6 @@ abstract class base implements search_backend_interface
*/
public function create_index(int &$post_counter = 0): ?array
{
if ($this->index_created())
{
throw new index_created_exception();
}
$max_post_id = $this->get_max_post_id();
$forums_indexing_enabled = $this->forum_ids_with_indexing_enabled();
@@ -399,11 +392,6 @@ abstract class base implements search_backend_interface
*/
public function delete_index(int &$post_counter = null): ?array
{
if (!$this->index_created())
{
throw new index_empty_exception();
}
$max_post_id = $this->get_max_post_id();
$starttime = microtime(true);