mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-21 09:52:26 +01:00
Merge pull request #2881 from rxu/ticket/12986
[ticket/12986] Fix detection of common words in search * rxu/ticket/12986: [ticket/12986] Fix detection of common words in search
This commit is contained in:
commit
4ff5aa18ae
@ -281,12 +281,11 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
trigger_error($error);
|
||||
}
|
||||
|
||||
$common_words = $search->get_common_words();
|
||||
|
||||
// let the search module split up the keywords
|
||||
if ($keywords)
|
||||
{
|
||||
$correct_query = $search->split_keywords($keywords, $search_terms);
|
||||
$common_words = $search->get_common_words();
|
||||
if (!$correct_query || (!$search->get_search_query() && !sizeof($author_id_ary) && !$search_id))
|
||||
{
|
||||
$ignored = (sizeof($common_words)) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], implode(' ', $common_words)) . '<br />' : '';
|
||||
@ -599,7 +598,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
'SEARCH_MATCHES' => $l_search_matches,
|
||||
'SEARCH_WORDS' => $keywords,
|
||||
'SEARCHED_QUERY' => $search->get_search_query(),
|
||||
'IGNORED_WORDS' => (sizeof($common_words)) ? implode(' ', $common_words) : '',
|
||||
'IGNORED_WORDS' => (!empty($common_words)) ? implode(' ', $common_words) : '',
|
||||
|
||||
'PHRASE_SEARCH_DISABLED' => $phrase_search_disabled,
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user