aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorDhruv Goel <dhruv.goel92@gmail.com>2012-07-10 04:53:51 +0530
committerDhruv <dhruv.goel92@gmail.com>2012-07-12 17:32:09 +0530
commitd2e42d7d619100695e0efe8d472c71f61cbfcb45 (patch)
tree483fde48fad1f9013e287ad359ebe533b8c9662d /phpBB/includes
parent569db1471b3000512232732a790d8653250e8012 (diff)
downloadforums-d2e42d7d619100695e0efe8d472c71f61cbfcb45.tar
forums-d2e42d7d619100695e0efe8d472c71f61cbfcb45.tar.gz
forums-d2e42d7d619100695e0efe8d472c71f61cbfcb45.tar.bz2
forums-d2e42d7d619100695e0efe8d472c71f61cbfcb45.tar.xz
forums-d2e42d7d619100695e0efe8d472c71f61cbfcb45.zip
[feature/sphinx-fulltext-search] remove unnecessary code
Some extra conditions and variables used in autoconf are removed. PHPBB3-10946
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/search/fulltext_sphinx.php25
1 files changed, 5 insertions, 20 deletions
diff --git a/phpBB/includes/search/fulltext_sphinx.php b/phpBB/includes/search/fulltext_sphinx.php
index 710c3d56be..48855ef7d8 100644
--- a/phpBB/includes/search/fulltext_sphinx.php
+++ b/phpBB/includes/search/fulltext_sphinx.php
@@ -59,11 +59,8 @@ class phpbb_search_fulltext_sphinx
$this->sphinx = new SphinxClient();
- if (!empty($config['fulltext_sphinx_configured']))
- {
- // 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);
- }
+ // 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);
$config['fulltext_sphinx_min_word_len'] = 2;
$config['fulltext_sphinx_max_word_len'] = 400;
@@ -125,7 +122,7 @@ class phpbb_search_fulltext_sphinx
// now that we're sure everything was entered correctly, generate a config for the index
// we misuse the avatar_salt for this, as it should be unique ;-)
- $config_object = new phpbb_search_sphinx_config($config['fulltext_sphinx_config_path'] . 'sphinx.conf');
+ $config_object = new phpbb_search_sphinx_config($config['fulltext_sphinx_config_path'] . 'sphinx.conf');
$config_data = array(
'source source_phpbb_' . $this->id . '_main' => array(
@@ -266,10 +263,6 @@ class phpbb_search_fulltext_sphinx
}
}
- set_config('fulltext_sphinx_configured', '1');
-
- $this->tidy();
-
return false;
}
@@ -613,11 +606,6 @@ class phpbb_search_fulltext_sphinx
{
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())
{
$sql = 'CREATE TABLE IF NOT EXISTS ' . SPHINX_TABLE . ' (
@@ -630,9 +618,6 @@ class phpbb_search_fulltext_sphinx
$db->sql_query($sql);
}
- // start indexing process
- $this->tidy(true);
-
return false;
}
@@ -645,7 +630,7 @@ class phpbb_search_fulltext_sphinx
*/
function delete_index($acp_module, $u_action)
{
- global $db, $config;
+ global $db;
if (!$this->index_created())
{
@@ -715,7 +700,7 @@ class phpbb_search_fulltext_sphinx
*/
function get_stats()
{
- global $db, $config;
+ global $db;
if ($this->index_created())
{