diff options
author | Dhruv Goel <dhruv.goel92@gmail.com> | 2012-06-11 16:34:47 +0530 |
---|---|---|
committer | Dhruv Goel <dhruv.goel92@gmail.com> | 2012-07-05 21:13:36 +0530 |
commit | 8c170eb6a0ce3b282baa81ea331c75c013367356 (patch) | |
tree | 24b175adb375d1a867a4b2fc17a1dfa9709a9cc1 /phpBB | |
parent | 6958e8b6d9e63a0f2938aaf8b9a5bbffcbdcf699 (diff) | |
download | forums-8c170eb6a0ce3b282baa81ea331c75c013367356.tar forums-8c170eb6a0ce3b282baa81ea331c75c013367356.tar.gz forums-8c170eb6a0ce3b282baa81ea331c75c013367356.tar.bz2 forums-8c170eb6a0ce3b282baa81ea331c75c013367356.tar.xz forums-8c170eb6a0ce3b282baa81ea331c75c013367356.zip |
[feature/postgresql-fulltext-search] use phpbb_pcre_utf8_support()
Use phpBB's built in function for checking PCRE lib support.
PHPBB3-9730
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/search/fulltext_postgres.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/phpBB/includes/search/fulltext_postgres.php b/phpBB/includes/search/fulltext_postgres.php index 7d1066e884..a0ddbcbe43 100644 --- a/phpBB/includes/search/fulltext_postgres.php +++ b/phpBB/includes/search/fulltext_postgres.php @@ -38,13 +38,10 @@ 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']); - if (version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) + // PHP may not be linked with the bundled PCRE lib and instead with an older version + if (phpbb_pcre_utf8_support()) { - // While this is the proper range of PHP versions, PHP may not be linked with the bundled PCRE lib and instead with an older version - if (@preg_match('/\p{L}/u', 'a') !== false) - { - $this->pcre_properties = true; - } + $this->pcre_properties = true; } if (function_exists('mb_ereg')) |