aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/search
diff options
context:
space:
mode:
authorDhruv Goel <dhruv.goel92@gmail.com>2012-07-10 03:55:23 +0530
committerDhruv <dhruv.goel92@gmail.com>2012-07-12 17:32:07 +0530
commit88089194e570edb77240138695034358062ffa58 (patch)
treef22452a2d7fd354828b219a0085b1b4c5e507f8f /phpBB/includes/search
parente486f4389c99c27cb723d4e9fd437130752f891e (diff)
downloadforums-88089194e570edb77240138695034358062ffa58.tar
forums-88089194e570edb77240138695034358062ffa58.tar.gz
forums-88089194e570edb77240138695034358062ffa58.tar.bz2
forums-88089194e570edb77240138695034358062ffa58.tar.xz
forums-88089194e570edb77240138695034358062ffa58.zip
[feature/sphinx-fulltext-search] prefix sphinx with constant names
All constant names are prefixed with SPHINX_ PHPBB3-10946
Diffstat (limited to 'phpBB/includes/search')
-rw-r--r--phpBB/includes/search/fulltext_sphinx.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/includes/search/fulltext_sphinx.php b/phpBB/includes/search/fulltext_sphinx.php
index 984bda68c2..7386833151 100644
--- a/phpBB/includes/search/fulltext_sphinx.php
+++ b/phpBB/includes/search/fulltext_sphinx.php
@@ -24,9 +24,9 @@ if (!defined('IN_PHPBB'))
global $phpbb_root_path, $phpEx, $table_prefix;
require($phpbb_root_path . "includes/sphinxapi-0.9.8." . $phpEx);
-define('MAX_MATCHES', 20000);
-define('CONNECT_RETRIES', 3);
-define('CONNECT_WAIT_TIME', 300);
+define('SPHINX_MAX_MATCHES', 20000);
+define('SPHINX_CONNECT_RETRIES', 3);
+define('SPHINX_CONNECT_WAIT_TIME', 300);
/**
* fulltext_sphinx
@@ -216,7 +216,7 @@ class phpbb_search_fulltext_sphinx
array('read_timeout', '5'),
array('max_children', '30'),
array('pid_file', $config['fulltext_sphinx_data_path'] . "searchd.pid"),
- array('max_matches', (string) MAX_MATCHES),
+ array('max_matches', (string) SPHINX_MAX_MATCHES),
array('binlog_path', $config['fulltext_sphinx_data_path']),
),
);
@@ -451,14 +451,14 @@ class phpbb_search_fulltext_sphinx
$this->sphinx->SetFilter('deleted', array(0));
- $this->sphinx->SetLimits($start, (int) $per_page, MAX_MATCHES);
+ $this->sphinx->SetLimits($start, (int) $per_page, SPHINX_MAX_MATCHES);
$result = $this->sphinx->Query($search_query_prefix . str_replace('&quot;', '"', $this->search_query), $this->indexes);
// could be connection to localhost:3312 failed (errno=111, msg=Connection refused) during rotate, retry if so
- $retries = CONNECT_RETRIES;
+ $retries = SPHINX_CONNECT_RETRIES;
while (!$result && (strpos($this->sphinx->_error, "errno=111,") !== false) && $retries--)
{
- usleep(CONNECT_WAIT_TIME);
+ usleep(SPHINX_CONNECT_WAIT_TIME);
$result = $this->sphinx->Query($search_query_prefix . str_replace('&quot;', '"', $this->search_query), $this->indexes);
}