From 52803a0bfd315e375221c446f597f64ecbfb2aae Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 16 Apr 2013 16:41:32 +0400 Subject: [PATCH] add SPHINX_SERVER --- config.php-dist | 3 +++ include/functions.php | 4 +++- include/sanity_config.php | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/config.php-dist b/config.php-dist index 5366120a..9dd46e29 100644 --- a/config.php-dist +++ b/config.php-dist @@ -108,6 +108,9 @@ // Enable fulltext search using Sphinx (http://www.sphinxsearch.com) // Please see http://tt-rss.org/wiki/SphinxSearch for more information. + define('SPHINX_SERVER', 'localhost:9312'); + // Hostname:port combination for the Sphinx server. + define('SPHINX_INDEX', 'ttrss'); // Index name in Sphinx configuration. You can specify multiple indexes // as a comma-separated string. diff --git a/include/functions.php b/include/functions.php index 87eb3d6a..659950be 100644 --- a/include/functions.php +++ b/include/functions.php @@ -3824,7 +3824,9 @@ $sphinxClient = new SphinxClient(); - $sphinxClient->SetServer('localhost', 9312); + $sphinxpair = explode(":", SPHINX_SERVER, 2); + + $sphinxClient->SetServer($sphinxpair[0], $sphinxpair[1]); $sphinxClient->SetConnectTimeout(1); $sphinxClient->SetFieldWeights(array('title' => 70, 'content' => 30, diff --git a/include/sanity_config.php b/include/sanity_config.php index 255b404d..398c979f 100644 --- a/include/sanity_config.php +++ b/include/sanity_config.php @@ -1,3 +1,3 @@ - +$requred_defines = array( 'DB_TYPE', 'DB_HOST', 'DB_USER', 'DB_NAME', 'DB_PASS', 'MYSQL_CHARSET', 'SELF_URL_PATH', 'FEED_CRYPT_KEY', 'SINGLE_USER_MODE', 'SIMPLE_UPDATE_MODE', 'PHP_EXECUTABLE', 'LOCK_DIRECTORY', 'CACHE_DIR', 'ICONS_DIR', 'ICONS_URL', 'AUTH_AUTO_CREATE', 'AUTH_AUTO_LOGIN', 'FORCE_ARTICLE_PURGE', 'PUBSUBHUBBUB_HUB', 'PUBSUBHUBBUB_ENABLED', 'SPHINX_ENABLED', 'SPHINX_SERVER', 'SPHINX_INDEX', 'ENABLE_REGISTRATION', 'REG_NOTIFY_ADDRESS', 'REG_MAX_USERS', 'SESSION_COOKIE_LIFETIME', 'SESSION_CHECK_ADDRESS', 'SMTP_FROM_NAME', 'SMTP_FROM_ADDRESS', 'DIGEST_SUBJECT', 'SMTP_SERVER', 'SMTP_LOGIN', 'SMTP_PASSWORD', 'CHECK_FOR_NEW_VERSION', 'ENABLE_GZIP_OUTPUT', 'PLUGINS', 'CONFIG_VERSION'); ?> -- 2.39.5