aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/search.php
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2012-08-16 22:35:50 +0530
committerDhruv <dhruv.goel92@gmail.com>2012-08-16 23:16:58 +0530
commit7402328b8177a2080cc269be12aeb84f54d65a22 (patch)
treee8c299eb836c85268eb803d9104bd2f957dc1e47 /phpBB/search.php
parent6f61169e41ed4115cc45db0b82d1acaecab0296d (diff)
downloadforums-7402328b8177a2080cc269be12aeb84f54d65a22.tar
forums-7402328b8177a2080cc269be12aeb84f54d65a22.tar.gz
forums-7402328b8177a2080cc269be12aeb84f54d65a22.tar.bz2
forums-7402328b8177a2080cc269be12aeb84f54d65a22.tar.xz
forums-7402328b8177a2080cc269be12aeb84f54d65a22.zip
[ticket/11051] function instead of accessing property in search
Use get_search_query() instead of accessing the search_query property directly as it is now protected. PHPBB3-11051
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index 190da5247f..c6c92e68b0 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -291,7 +291,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
if ($keywords)
{
$correct_query = $search->split_keywords($keywords, $search_terms);
- if (!$correct_query || (empty($search->search_query) && !sizeof($author_id_ary) && !$search_id))
+ if (!$correct_query || (!$search->get_search_query() && !sizeof($author_id_ary) && !$search_id))
{
$ignored = (sizeof($search->common_words)) ? sprintf($user->lang['IGNORED_TERMS_EXPLAIN'], implode(' ', $search->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'])));
@@ -526,7 +526,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
sort($m_approve_fid_ary);
sort($author_id_ary);
- if (!empty($search->search_query))
+ if ($search->get_search_query())
{
$total_match_count = $search->keyword_search($show_results, $search_fields, $search_terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_id_ary, $sql_author_match, $id_ary, $start, $per_page);
}
@@ -609,7 +609,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'SEARCH_TITLE' => $l_search_title,
'SEARCH_MATCHES' => $l_search_matches,
'SEARCH_WORDS' => $keywords,
- 'SEARCHED_QUERY' => $search->search_query,
+ 'SEARCHED_QUERY' => $search->get_search_query(),
'IGNORED_WORDS' => (sizeof($search->common_words)) ? implode(' ', $search->common_words) : '',
'PAGE_NUMBER' => phpbb_on_page($template, $user, $u_search, $total_match_count, $per_page, $start),