1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-30 19:24:13 +02:00

[ticket/11051] use get_word_length in search backend

Use get_word_length() instead od accessing the word_length property
directly as it is now protected.

PHPBB3-11051
This commit is contained in:
Dhruv 2012-08-17 00:11:32 +05:30
parent 9b9dc2fab7
commit a2e1989b01

View File

@ -294,7 +294,9 @@ if ($keywords || $author || $author_id || $search_id || $submit)
if (!$correct_query || (!$search->get_search_query() && !sizeof($author_id_ary) && !$search_id))
{
$ignored = (sizeof($search->get_common_words())) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], implode(' ', $search->get_common_words())) . '<br />' : '';
trigger_error($ignored . $user->lang('NO_KEYWORDS', $user->lang('CHARACTERS', (int) $search->word_length['min']), $user->lang('CHARACTERS', (int) $search->word_length['max'])));
// Function cannot be directly used as associative array for php < 5.4
$word_length = $search->get_word_length();
trigger_error($ignored . $user->lang('NO_KEYWORDS', $user->lang('CHARACTERS', (int) $word_length['min']), $user->lang('CHARACTERS', (int) $word_length['max'])));
}
}