aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2012-08-08 01:18:10 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2012-08-08 01:18:10 -0400
commitce32a31b60224e6c87501bb856fef9b00e8c7cd2 (patch)
treecd6bd47eda71cd033a1547ea4d8227781b7e35a2 /phpBB
parentbb40b558f1a85079b59f5b3a2604a03bf893a4ca (diff)
parent9358bf3de5fe402ccdc116e6b74e0cd2eee35e37 (diff)
downloadforums-ce32a31b60224e6c87501bb856fef9b00e8c7cd2.tar
forums-ce32a31b60224e6c87501bb856fef9b00e8c7cd2.tar.gz
forums-ce32a31b60224e6c87501bb856fef9b00e8c7cd2.tar.bz2
forums-ce32a31b60224e6c87501bb856fef9b00e8c7cd2.tar.xz
forums-ce32a31b60224e6c87501bb856fef9b00e8c7cd2.zip
Merge PR #933 branch 'dhruvgoel92/ticket/11032' into develop
* dhruvgoel92/ticket/11032: [ticket/11032] use method GetLastError to get error [ticket/11032] add sphinx errors to error log
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/search/fulltext_sphinx.php7
-rw-r--r--phpBB/language/en/acp/common.php1
2 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/includes/search/fulltext_sphinx.php b/phpBB/includes/search/fulltext_sphinx.php
index 8371f6b377..90ceb29616 100644
--- a/phpBB/includes/search/fulltext_sphinx.php
+++ b/phpBB/includes/search/fulltext_sphinx.php
@@ -492,10 +492,15 @@ class phpbb_search_fulltext_sphinx
$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);
+ if ($this->sphinx->GetLastError())
+ {
+ add_log('critical', 'LOG_SPHINX_ERROR', $this->sphinx->GetLastError());
+ }
+
// Could be connection to localhost:9312 failed (errno=111,
// msg=Connection refused) during rotate, retry if so
$retries = SPHINX_CONNECT_RETRIES;
- while (!$result && (strpos($this->sphinx->_error, "errno=111,") !== false) && $retries--)
+ while (!$result && (strpos($this->sphinx->GetLastError(), "errno=111,") !== false) && $retries--)
{
usleep(SPHINX_CONNECT_WAIT_TIME);
$result = $this->sphinx->Query($search_query_prefix . str_replace('&quot;', '"', $this->search_query), $this->indexes);
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 5cebcc89d7..04df897dba 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -690,6 +690,7 @@ $lang = array_merge($lang, array(
'LOG_SEARCH_INDEX_CREATED' => '<strong>Created search index for</strong><br />» %s',
'LOG_SEARCH_INDEX_REMOVED' => '<strong>Removed search index for</strong><br />» %s',
+ 'LOG_SPHINX_ERROR' => '<strong>Sphinx Error</strong><br />» %s',
'LOG_STYLE_ADD' => '<strong>Added new style</strong><br />» %s',
'LOG_STYLE_DELETE' => '<strong>Deleted style</strong><br />» %s',
'LOG_STYLE_EDIT_DETAILS' => '<strong>Edited style</strong><br />» %s',