From 83a4d9abb58d22d9533e257dfaff83bac0d2a304 Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Wed, 20 Jun 2012 11:14:16 +0530 Subject: [PATCH 1/2] [ticket/10943] use keywords variable to display in search box $keywords which contains the string as entered by the user should be used to display in search box instead of search_query. PHPBB3-10943 --- phpBB/search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/search.php b/phpBB/search.php index 8cb2020630..7f3bd98289 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -603,7 +603,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) $template->assign_vars(array( 'SEARCH_TITLE' => $l_search_title, 'SEARCH_MATCHES' => $l_search_matches, - 'SEARCH_WORDS' => $search->search_query, + 'SEARCH_WORDS' => $keywords, 'IGNORED_WORDS' => (sizeof($search->common_words)) ? implode(' ', $search->common_words) : '', 'PAGINATION' => generate_pagination($u_search, $total_match_count, $per_page, $start), 'PAGE_NUMBER' => on_page($total_match_count, $per_page, $start), From 2ba1cef5b03fc7c2c44076d21426d0b5028eda27 Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Fri, 22 Jun 2012 15:16:13 +0530 Subject: [PATCH 2/2] [ticket/10943] displays searched query in search result Search backend displays an additional normalized search query just above the ignored words. PHPBB3-10943 --- phpBB/language/en/search.php | 1 + phpBB/search.php | 1 + phpBB/styles/prosilver/template/search_results.html | 1 + 3 files changed, 3 insertions(+) diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php index cd38cd615f..97bc1f9bac 100644 --- a/phpBB/language/en/search.php +++ b/phpBB/language/en/search.php @@ -77,6 +77,7 @@ $lang = array_merge($lang, array( 'SEARCHED_FOR' => 'Search term used', 'SEARCHED_TOPIC' => 'Searched topic', + 'SEARCHED_QUERY' => 'Searched query', 'SEARCH_ALL_TERMS' => 'Search for all terms or use query as entered', 'SEARCH_ANY_TERMS' => 'Search for any terms', 'SEARCH_AUTHOR' => 'Search for author', diff --git a/phpBB/search.php b/phpBB/search.php index 7f3bd98289..ad9c371f63 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -604,6 +604,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, 'IGNORED_WORDS' => (sizeof($search->common_words)) ? implode(' ', $search->common_words) : '', 'PAGINATION' => generate_pagination($u_search, $total_match_count, $per_page, $start), 'PAGE_NUMBER' => on_page($total_match_count, $per_page, $start), diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html index f2a4435103..0ea9d8a047 100644 --- a/phpBB/styles/prosilver/template/search_results.html +++ b/phpBB/styles/prosilver/template/search_results.html @@ -1,6 +1,7 @@

{SEARCH_TITLE}{SEARCH_MATCHES}: {SEARCH_WORDS}

+

{L_SEARCHED_QUERY}: {SEARCHED_QUERY}

{L_IGNORED_TERMS}: {IGNORED_WORDS}