mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 23:37:39 +02:00
[ticket/12683] Undo changes in fulltext_sphinx.php
PHPBB3-12683
This commit is contained in:
@@ -630,6 +630,8 @@ class fulltext_sphinx implements search_backend_interface
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function create_index(int &$post_counter = 0): ?array
|
||||
{
|
||||
if (!$this->index_created())
|
||||
{
|
||||
$table_data = array(
|
||||
'COLUMNS' => array(
|
||||
@@ -640,15 +642,13 @@ class fulltext_sphinx implements search_backend_interface
|
||||
);
|
||||
$this->db_tools->sql_create_table(SPHINX_TABLE, $table_data);
|
||||
|
||||
$sql = 'TRUNCATE TABLE ' . SPHINX_TABLE;
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
$data = array(
|
||||
'counter_id' => '1',
|
||||
'max_doc_id' => '0',
|
||||
);
|
||||
$sql = 'INSERT INTO ' . SPHINX_TABLE . ' ' . $this->db->sql_build_array('INSERT', $data);
|
||||
$this->db->sql_query($sql);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -657,8 +657,11 @@ class fulltext_sphinx implements search_backend_interface
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function delete_index(int &$post_counter = null): ?array
|
||||
{
|
||||
if ($this->index_created())
|
||||
{
|
||||
$this->db_tools->sql_table_drop(SPHINX_TABLE);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user