mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/sphinx-fulltext-search] remove unnecessary code
Some extra conditions and variables used in autoconf are removed. PHPBB3-10946
This commit is contained in:
parent
569db1471b
commit
d2e42d7d61
1 changed files with 5 additions and 20 deletions
|
@ -59,11 +59,8 @@ class phpbb_search_fulltext_sphinx
|
||||||
|
|
||||||
$this->sphinx = new SphinxClient();
|
$this->sphinx = new SphinxClient();
|
||||||
|
|
||||||
if (!empty($config['fulltext_sphinx_configured']))
|
// We only support localhost for now
|
||||||
{
|
|
||||||
// we only support localhost for now
|
|
||||||
$this->sphinx->SetServer('localhost', (isset($config['fulltext_sphinx_port']) && $config['fulltext_sphinx_port']) ? (int) $config['fulltext_sphinx_port'] : 3312);
|
$this->sphinx->SetServer('localhost', (isset($config['fulltext_sphinx_port']) && $config['fulltext_sphinx_port']) ? (int) $config['fulltext_sphinx_port'] : 3312);
|
||||||
}
|
|
||||||
|
|
||||||
$config['fulltext_sphinx_min_word_len'] = 2;
|
$config['fulltext_sphinx_min_word_len'] = 2;
|
||||||
$config['fulltext_sphinx_max_word_len'] = 400;
|
$config['fulltext_sphinx_max_word_len'] = 400;
|
||||||
|
@ -266,10 +263,6 @@ class phpbb_search_fulltext_sphinx
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set_config('fulltext_sphinx_configured', '1');
|
|
||||||
|
|
||||||
$this->tidy();
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -613,11 +606,6 @@ class phpbb_search_fulltext_sphinx
|
||||||
{
|
{
|
||||||
global $db, $user, $config;
|
global $db, $user, $config;
|
||||||
|
|
||||||
if (!isset($config['fulltext_sphinx_configured']) || !$config['fulltext_sphinx_configured'])
|
|
||||||
{
|
|
||||||
return $user->lang['FULLTEXT_SPHINX_CONFIGURE_FIRST'];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$this->index_created())
|
if (!$this->index_created())
|
||||||
{
|
{
|
||||||
$sql = 'CREATE TABLE IF NOT EXISTS ' . SPHINX_TABLE . ' (
|
$sql = 'CREATE TABLE IF NOT EXISTS ' . SPHINX_TABLE . ' (
|
||||||
|
@ -630,9 +618,6 @@ class phpbb_search_fulltext_sphinx
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
// start indexing process
|
|
||||||
$this->tidy(true);
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -645,7 +630,7 @@ class phpbb_search_fulltext_sphinx
|
||||||
*/
|
*/
|
||||||
function delete_index($acp_module, $u_action)
|
function delete_index($acp_module, $u_action)
|
||||||
{
|
{
|
||||||
global $db, $config;
|
global $db;
|
||||||
|
|
||||||
if (!$this->index_created())
|
if (!$this->index_created())
|
||||||
{
|
{
|
||||||
|
@ -715,7 +700,7 @@ class phpbb_search_fulltext_sphinx
|
||||||
*/
|
*/
|
||||||
function get_stats()
|
function get_stats()
|
||||||
{
|
{
|
||||||
global $db, $config;
|
global $db;
|
||||||
|
|
||||||
if ($this->index_created())
|
if ($this->index_created())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue