From 6b5780b753a857dec087d363601e54f1515213fa Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sun, 12 May 2013 16:03:48 +0530 Subject: [ticket/10820] fix regex Extract IE version from user agent string and then compare it with 7 PHPBB3-10820 --- phpBB/download/file.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'phpBB/download') diff --git a/phpBB/download/file.php b/phpBB/download/file.php index f781480bb7..abc67ecdac 100644 --- a/phpBB/download/file.php +++ b/phpBB/download/file.php @@ -718,7 +718,15 @@ function file_gc() */ function phpbb_is_greater_ie7($user_agent) { - return (bool) preg_match('/msie [^67]+\\.*;/', strtolower($user_agent)); + if (preg_match('/msie (\d+)/', strtolower($user_agent), $matches)) + { + $ie_version = (int) $matches[1]; + return ($ie_version > 7); + } + else + { + return false; + } } ?> \ No newline at end of file -- cgit v1.2.1