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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user