diff options
Diffstat (limited to 'phpBB/includes/cache.php')
-rw-r--r-- | phpBB/includes/cache.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/phpBB/includes/cache.php b/phpBB/includes/cache.php index a0142292ed..6b1e078ca4 100644 --- a/phpBB/includes/cache.php +++ b/phpBB/includes/cache.php @@ -82,9 +82,11 @@ class cache extends acm $result = $db->sql_query($sql); $censors = array(); + $unicode = ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false) ? true : false; + while ($row = $db->sql_fetchrow($result)) { - if ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false) + if ($unicode) { $censors['match'][] = '#(?<![\p{Nd}\p{L}_])(' . str_replace('\*', '[\p{Nd}\p{L}_]*?', preg_quote($row['word'], '#')) . ')(?![\p{Nd}\p{L}_])#iu'; } @@ -297,6 +299,7 @@ class cache extends acm { case 'mssql': case 'mssql_odbc': + case 'mssqlnative': $sql = 'SELECT user_id, bot_agent, bot_ip FROM ' . BOTS_TABLE . ' WHERE bot_active = 1 |