aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDhruv Goel <dhruv.goel92@gmail.com>2012-06-12 05:07:05 +0530
committerDhruv Goel <dhruv.goel92@gmail.com>2012-07-05 21:17:16 +0530
commit8e035f9141f79ba12ff6f20d9d2ea0008f73fa1e (patch)
tree2a0611c51d870c0cf5904cd4503fb65be4473ef9
parent2821dc332537ec962ad1552d523ffaa7f50d7a43 (diff)
downloadforums-8e035f9141f79ba12ff6f20d9d2ea0008f73fa1e.tar
forums-8e035f9141f79ba12ff6f20d9d2ea0008f73fa1e.tar.gz
forums-8e035f9141f79ba12ff6f20d9d2ea0008f73fa1e.tar.bz2
forums-8e035f9141f79ba12ff6f20d9d2ea0008f73fa1e.tar.xz
forums-8e035f9141f79ba12ff6f20d9d2ea0008f73fa1e.zip
[feature/postgresql-fulltext-search] removes pcre check
PCRE UTF8 support is already checked globally. adds an option of pgsql version to acp. PHPBB3-9730
-rw-r--r--phpBB/includes/search/fulltext_postgres.php12
-rw-r--r--phpBB/language/en/acp/search.php4
2 files changed, 6 insertions, 10 deletions
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 = '
<dl>
- <dt><label>' . $user->lang['FULLTEXT_POSTGRES_PCRE'] . '</label><br /><span>' . $user->lang['FULLTEXT_POSTGRES_PCRE_EXPLAIN'] . '</span></dt>
- <dd>' . (($this->pcre_properties) ? $user->lang['YES'] : $user->lang['NO']) . ' (PHP ' . PHP_VERSION . ')</dd>
+ <dt><label>' . $user->lang['FULLTEXT_POSTGRES_VERSION_CHECK'] . '</label><br /><span>' . $user->lang['FULLTEXT_POSTGRES_VERSION_CHECK_EXPLAIN'] . '</span></dt>
+ <dd>' . (($this->tsearch_usable) ? $user->lang['YES'] : $user->lang['NO']) . ' (PostgreSQL ' . $pgsql_version[0] . ')</dd>
</dl>
<dl>
<dt><label>' . $user->lang['FULLTEXT_POSTGRES_TS_NAME'] . '</label><br /><span>' . $user->lang['FULLTEXT_POSTGRES_TS_NAME_EXPLAIN'] . '</span></dt>
diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php
index 736a3049a8..be147a78de 100644
--- a/phpBB/language/en/acp/search.php
+++ b/phpBB/language/en/acp/search.php
@@ -64,11 +64,11 @@ $lang = array_merge($lang, array(
'FULLTEXT_POSTGRES_INCOMPATIBLE_VERSION' => 'The PostgreSQL fulltext backend can only be used with PostgreSQL.',
'FULLTEXT_POSTGRES_TS_NOT_USABLE' => 'The PostgreSQL fulltext backend can only be used with PostgreSQL 8.3 and above.',
'FULLTEXT_POSTGRES_TOTAL_POSTS' => 'Total number of indexed posts',
- 'FULLTEXT_POSTGRES_PCRE' => 'Support for non-latin UTF-8 characters using PCRE:',
+ 'FULLTEXT_POSTGRES_VERSION_CHECK' => 'PostgreSQL version',
'FULLTEXT_POSTGRES_TS_NAME' => 'Text search Configuration Profile:',
'FULLTEXT_POSTGRES_MIN_WORD_LEN' => 'Minimum word length for keywords',
'FULLTEXT_POSTGRES_MAX_WORD_LEN' => 'Maximum word length for keywords',
- 'FULLTEXT_POSTGRES_PCRE_EXPLAIN' => 'This search backend requires PCRE unicode character properties, only available in PHP 4.4, 5.1 and above, if you want to search for non-latin characters.',
+ 'FULLTEXT_POSTGRES_VERSION_CHECK_EXPLAIN' => 'This search backend requires PostgreSQL version 8.3 and above.',
'FULLTEXT_POSTGRES_TS_NAME_EXPLAIN' => 'The Text search configuration profile used to determine the parser and dictionary.',
'FULLTEXT_POSTGRES_MIN_WORD_LEN_EXPLAIN' => 'Words with at least this many characters will be included in the query to the database.',
'FULLTEXT_POSTGRES_MAX_WORD_LEN_EXPLAIN' => 'Words with no more than this many characters will be included in the query to the database.',