aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/search/fulltext_postgres.php14
-rw-r--r--phpBB/search.php4
2 files changed, 15 insertions, 3 deletions
diff --git a/phpBB/includes/search/fulltext_postgres.php b/phpBB/includes/search/fulltext_postgres.php
index 79c8035438..84ce674564 100644
--- a/phpBB/includes/search/fulltext_postgres.php
+++ b/phpBB/includes/search/fulltext_postgres.php
@@ -27,10 +27,10 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
private $tsearch_usable = false;
private $version;
private $tsearch_query;
+ private $phrase_search = false;
public $search_query;
public $common_words = array();
public $word_length = array();
- public $phrase_search = false;
/**
* Constructor
@@ -71,6 +71,18 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
}
/**
+ * Returns if phrase search is supported or not
+ *
+ * @return bool
+ *
+ * @access public
+ */
+ public function supports_phrase_search()
+ {
+ return $this->phrase_search;
+ }
+
+ /**
* Checks for correct PostgreSQL version and stores min/max word length in the config
*
* @return string|bool Language key of the error/incompatiblity occured
diff --git a/phpBB/search.php b/phpBB/search.php
index c93dbdfd34..1123d7c5b9 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -598,9 +598,9 @@ if ($keywords || $author || $author_id || $search_id || $submit)
// Check if search backend supports phrase search or not
$phrase_search_disabled = '';
- if (strpos(html_entity_decode($keywords), '"') !== false && isset($search->phrase_search))
+ if (strpos(html_entity_decode($keywords), '"') !== false && method_exists($search, 'supports_phrase_search'))
{
- $phrase_search_disabled = $search->phrase_search ? false : true;
+ $phrase_search_disabled = $search->supports_phrase_search() ? false : true;
}
$template->assign_vars(array(