diff options
| author | Igor Wiedler <igor@wiedler.ch> | 2010-06-25 19:09:17 +0200 |
|---|---|---|
| committer | Igor Wiedler <igor@wiedler.ch> | 2010-12-28 22:37:33 +0100 |
| commit | 6b4d0a254218e8d40151ca1bdff8c439f89502e9 (patch) | |
| tree | 18a2fdf9db565110c73f796e030b1fbed2393472 /phpBB/includes/acp/acp_bbcodes.php | |
| parent | eda9fbbb6363cad0f2035b7a1f9fafe27f23832b (diff) | |
| download | forums-6b4d0a254218e8d40151ca1bdff8c439f89502e9.tar forums-6b4d0a254218e8d40151ca1bdff8c439f89502e9.tar.gz forums-6b4d0a254218e8d40151ca1bdff8c439f89502e9.tar.bz2 forums-6b4d0a254218e8d40151ca1bdff8c439f89502e9.tar.xz forums-6b4d0a254218e8d40151ca1bdff8c439f89502e9.zip | |
[ticket/9574] Add pcre_utf8_support() function
Refactor the check for PCRE UTF-8 support into a new pcre_utf8_support()
function.
PHPBB3-9574
Diffstat (limited to 'phpBB/includes/acp/acp_bbcodes.php')
| -rw-r--r-- | phpBB/includes/acp/acp_bbcodes.php | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index b046424790..b6bbbdc0cf 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -317,13 +317,7 @@ class acp_bbcodes $bbcode_tpl = trim($bbcode_tpl); $utf8 = strpos($bbcode_match, 'INTTEXT') !== false; - // make sure we have utf8 support - // PHP may not be linked with the bundled PCRE lib and instead with an older version - $utf8_pcre_properties = false; - if (@preg_match('/\p{L}/u', 'a') !== false) - { - $utf8_pcre_properties = true; - } + $utf8_pcre_properties = pcre_utf8_support(); $fp_match = preg_quote($bbcode_match, '!'); $fp_replace = preg_replace('#^\[(.*?)\]#', '[$1:$uid]', $bbcode_match); |
