mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-04 05:25:01 +02:00
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
This commit is contained in:
commit
ce32a31b60
@ -492,10 +492,15 @@ class phpbb_search_fulltext_sphinx
|
|||||||
$this->sphinx->SetLimits($start, (int) $per_page, SPHINX_MAX_MATCHES);
|
$this->sphinx->SetLimits($start, (int) $per_page, SPHINX_MAX_MATCHES);
|
||||||
$result = $this->sphinx->Query($search_query_prefix . str_replace('"', '"', $this->search_query), $this->indexes);
|
$result = $this->sphinx->Query($search_query_prefix . str_replace('"', '"', $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,
|
// Could be connection to localhost:9312 failed (errno=111,
|
||||||
// msg=Connection refused) during rotate, retry if so
|
// msg=Connection refused) during rotate, retry if so
|
||||||
$retries = SPHINX_CONNECT_RETRIES;
|
$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);
|
usleep(SPHINX_CONNECT_WAIT_TIME);
|
||||||
$result = $this->sphinx->Query($search_query_prefix . str_replace('"', '"', $this->search_query), $this->indexes);
|
$result = $this->sphinx->Query($search_query_prefix . str_replace('"', '"', $this->search_query), $this->indexes);
|
||||||
|
@ -690,6 +690,7 @@ $lang = array_merge($lang, array(
|
|||||||
|
|
||||||
'LOG_SEARCH_INDEX_CREATED' => '<strong>Created search index for</strong><br />» %s',
|
'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_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_ADD' => '<strong>Added new style</strong><br />» %s',
|
||||||
'LOG_STYLE_DELETE' => '<strong>Deleted style</strong><br />» %s',
|
'LOG_STYLE_DELETE' => '<strong>Deleted style</strong><br />» %s',
|
||||||
'LOG_STYLE_EDIT_DETAILS' => '<strong>Edited style</strong><br />» %s',
|
'LOG_STYLE_EDIT_DETAILS' => '<strong>Edited style</strong><br />» %s',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user