mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
- Throw error on incorrect search queries [Bug #5648]
git-svn-id: file:///svn/phpbb/trunk@6675 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
1f118ba2ae
commit
49e8de0ca2
1 changed files with 2 additions and 2 deletions
|
@ -231,8 +231,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||||
// let the search module split up the keywords
|
// let the search module split up the keywords
|
||||||
if ($keywords)
|
if ($keywords)
|
||||||
{
|
{
|
||||||
$search->split_keywords($keywords, $search_terms);
|
$correct_query = $search->split_keywords($keywords, $search_terms);
|
||||||
if (empty($search->search_query) && !sizeof($author_id_ary) && !$search_id)
|
if (!$correct_query || (empty($search->search_query) && !sizeof($author_id_ary) && !$search_id))
|
||||||
{
|
{
|
||||||
$ignored = (sizeof($search->common_words)) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], htmlspecialchars(implode(' ', $search->common_words), ENT_COMPAT, 'UTF-8')) . '<br />' : '';
|
$ignored = (sizeof($search->common_words)) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], htmlspecialchars(implode(' ', $search->common_words), ENT_COMPAT, 'UTF-8')) . '<br />' : '';
|
||||||
trigger_error($ignored . sprintf($user->lang['NO_KEYWORDS'], $search->word_length['min'], $search->word_length['max']));
|
trigger_error($ignored . sprintf($user->lang['NO_KEYWORDS'], $search->word_length['min'], $search->word_length['max']));
|
||||||
|
|
Loading…
Add table
Reference in a new issue