From 8e035f9141f79ba12ff6f20d9d2ea0008f73fa1e Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Tue, 12 Jun 2012 05:07:05 +0530 Subject: [feature/postgresql-fulltext-search] removes pcre check PCRE UTF8 support is already checked globally. adds an option of pgsql version to acp. PHPBB3-9730 --- phpBB/includes/search/fulltext_postgres.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'phpBB/includes/search/fulltext_postgres.php') diff --git a/phpBB/includes/search/fulltext_postgres.php b/phpBB/includes/search/fulltext_postgres.php index f5d9b3c760..b33def9462 100644 --- a/phpBB/includes/search/fulltext_postgres.php +++ b/phpBB/includes/search/fulltext_postgres.php @@ -28,7 +28,6 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base var $search_query; var $tsearch_query; var $common_words = array(); - var $pcre_properties = false; var $tsearch_usable = false; public function __construct(&$error) @@ -37,11 +36,6 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base $this->word_length = array('min' => $config['fulltext_postgres_min_word_len'], 'max' => $config['fulltext_postgres_max_word_len']); - // PHP may not be linked with the bundled PCRE lib and instead with an older version - if (phpbb_pcre_utf8_support()) - { - $this->pcre_properties = true; - } if ($db->sql_layer == 'postgres') { @@ -784,10 +778,12 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base { global $user, $config, $db; + $pgsql_version = explode(',', substr($db->sql_server_info(), 10)); + $tpl = '
-

' . $user->lang['FULLTEXT_POSTGRES_PCRE_EXPLAIN'] . '
-
' . (($this->pcre_properties) ? $user->lang['YES'] : $user->lang['NO']) . ' (PHP ' . PHP_VERSION . ')
+

' . $user->lang['FULLTEXT_POSTGRES_VERSION_CHECK_EXPLAIN'] . '
+
' . (($this->tsearch_usable) ? $user->lang['YES'] : $user->lang['NO']) . ' (PostgreSQL ' . $pgsql_version[0] . ')

' . $user->lang['FULLTEXT_POSTGRES_TS_NAME_EXPLAIN'] . '
-- cgit v1.2.1