From 161e469b5a67b2911089ec0dfdb70bef355ed07e Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sun, 22 Jul 2012 02:50:53 +0530 Subject: [feature/sphinx-fulltext-search] makes sql host configurable The SQL server host which sphinx connects to index the posts is now configurable via ACP. PHPBB3-10946 --- phpBB/includes/search/fulltext_sphinx.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'phpBB/includes') diff --git a/phpBB/includes/search/fulltext_sphinx.php b/phpBB/includes/search/fulltext_sphinx.php index 1888057db4..3bdce5dfb9 100644 --- a/phpBB/includes/search/fulltext_sphinx.php +++ b/phpBB/includes/search/fulltext_sphinx.php @@ -162,11 +162,11 @@ class phpbb_search_fulltext_sphinx $config_data = array( 'source source_phpbb_' . $this->id . '_main' => array( array('type', $this->dbtype), - array('sql_host', $dbhost), + array('sql_host', $this->config['fulltext_sphinx_host'] ? $this->config['fulltext_sphinx_host'] : $dbhost), array('sql_user', $dbuser), array('sql_pass', $dbpasswd), array('sql_db', $dbname), - array('sql_port', $dbport), + array('sql_port', $this->config['fulltext_sphinx_port']), array('sql_query_pre', 'SET NAMES \'utf8\''), array('sql_query_pre', 'UPDATE ' . SPHINX_TABLE . ' SET max_doc_id = (SELECT MAX(post_id) FROM ' . POSTS_TABLE . ') WHERE counter_id = 1'), array('sql_query_range', 'SELECT MIN(post_id), MAX(post_id) FROM ' . POSTS_TABLE . ''), @@ -759,6 +759,7 @@ class phpbb_search_fulltext_sphinx $config_vars = array( 'fulltext_sphinx_config_path' => 'string', 'fulltext_sphinx_data_path' => 'string', + 'fulltext_sphinx_host' => 'string', 'fulltext_sphinx_port' => 'int', 'fulltext_sphinx_stopwords' => 'bool', 'fulltext_sphinx_indexer_mem_limit' => 'int', @@ -778,6 +779,10 @@ class phpbb_search_fulltext_sphinx

' . $this->user->lang['FULLTEXT_SPHINX_STOPWORDS_FILE_EXPLAIN'] . '
+
+

' . $this->user->lang['FULLTEXT_SPHINX_HOST_EXPLAIN'] . '
+
+

' . $this->user->lang['FULLTEXT_SPHINX_PORT_EXPLAIN'] . '
-- cgit v1.2.1