mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-22 10:57:56 +01: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:
parent
4b8eac02f0
commit
698b7999c4
@ -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,
|
||||
|
@ -105,6 +105,8 @@ $lang = array_merge($lang, array(
|
||||
'SORT_FORUM' => 'Forum',
|
||||
'SORT_POST_SUBJECT' => 'Post subject',
|
||||
'SORT_TIME' => 'Post time',
|
||||
'SPHINX_SEARCH_FAILED' => 'Search failed. %s',
|
||||
'SPHINX_SEARCH_ERROR_LOG' => 'The error information has been logged.',
|
||||
|
||||
'TOO_FEW_AUTHOR_CHARS' => array(
|
||||
1 => 'You must specify at least %d character of the authors name.',
|
||||
|
Loading…
x
Reference in New Issue
Block a user