From 6b519c8bdfc5338f71967ee6cbdc53262afc3396 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 1 Feb 2010 22:14:04 +0000 Subject: [PATCH] Slight performance optimisation for r9624 refs #54265 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10470 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/cache.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/cache.php b/phpBB/includes/cache.php index a0142292ed..c760c20d52 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'][] = '#(?