1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 10:44:20 +02:00

[ticket/11032] trigger error in case search fails

Admins are shown actual error while users are shown a search failed error
in case sphinx search fails.

PHPBB3-11032
This commit is contained in:
Dhruv
2012-08-10 10:46:32 +05:30
parent 4b8eac02f0
commit 698b7999c4
2 changed files with 10 additions and 0 deletions

View File

@@ -495,6 +495,14 @@ class phpbb_search_fulltext_sphinx
if ($this->sphinx->GetLastError())
{
add_log('critical', 'LOG_SPHINX_ERROR', $this->sphinx->GetLastError());
if ($this->auth->acl_get('a_'))
{
trigger_error($this->user->lang('SPHINX_SEARCH_FAILED', $this->sphinx->GetLastError()));
}
else
{
trigger_error($this->user->lang('SPHINX_SEARCH_FAILED', $this->user->lang('SPHINX_SEARCH_ERROR_LOG')));
}
}
// Could be connection to localhost:9312 failed (errno=111,