mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/postgresql-fulltext-search] use phpbb_pcre_utf8_support()
Use phpBB's built in function for checking PCRE lib support. PHPBB3-9730
This commit is contained in:
parent
6958e8b6d9
commit
8c170eb6a0
1 changed files with 3 additions and 6 deletions
|
@ -38,14 +38,11 @@ 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']);
|
$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'))
|
if (function_exists('mb_ereg'))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue