aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/search.php
diff options
context:
space:
mode:
authorDhruv Goel <dhruv.goel92@gmail.com>2012-07-01 12:45:18 +0530
committerDhruv Goel <dhruv.goel92@gmail.com>2012-07-05 21:17:23 +0530
commit19d76f76dcd19e2bd44fbe7a384533bae4cb1538 (patch)
tree5a66d0ed8eeea374a2642d04a707ef21566cf22e /phpBB/search.php
parentf2dfaa73ffe96972f0d6b35aa65cf49b71d7513a (diff)
downloadforums-19d76f76dcd19e2bd44fbe7a384533bae4cb1538.tar
forums-19d76f76dcd19e2bd44fbe7a384533bae4cb1538.tar.gz
forums-19d76f76dcd19e2bd44fbe7a384533bae4cb1538.tar.bz2
forums-19d76f76dcd19e2bd44fbe7a384533bae4cb1538.tar.xz
forums-19d76f76dcd19e2bd44fbe7a384533bae4cb1538.zip
[feature/postgresql-fulltext-search] remove phrase search code
Unused Code for phrase search removed as pgsql doesnt support it. An added message is displayed if user tries to perform exact phrase search. PHPBB3-9730
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index 2b463aec9c..0d13644b02 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -596,6 +596,13 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$u_search .= ($search_fields != 'all') ? '&amp;sf=' . $search_fields : '';
$u_search .= ($return_chars != 300) ? '&amp;ch=' . $return_chars : '';
+ //check if search backend supports phrase search or not
+ $l_phrase_search_disabled = '';
+ if (strpos(html_entity_decode($keywords), '"') !== false && isset($search->phrase_search))
+ {
+ $l_phrase_search_disabled = $search->phrase_search ? false : true;
+ }
+
$template->assign_vars(array(
'SEARCH_TITLE' => $l_search_title,
'SEARCH_MATCHES' => $l_search_matches,
@@ -603,6 +610,9 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'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),
+
+ 'PHRASE_SEARCH_DISABLED' => $l_phrase_search_disabled,
+
'TOTAL_MATCHES' => $total_match_count,
'SEARCH_IN_RESULTS' => ($search_id) ? false : true,