diff options
author | Dhruv <dhruv.goel92@gmail.com> | 2013-05-12 16:03:48 +0530 |
---|---|---|
committer | Dhruv <dhruv.goel92@gmail.com> | 2013-06-12 20:22:46 +0530 |
commit | 6b5780b753a857dec087d363601e54f1515213fa (patch) | |
tree | 0159b2304d613eda8250e46a0aeb6645c625977e /phpBB/download/file.php | |
parent | 8f733cc658e20da74e910f3e36edcfdf86a7eba3 (diff) | |
download | forums-6b5780b753a857dec087d363601e54f1515213fa.tar forums-6b5780b753a857dec087d363601e54f1515213fa.tar.gz forums-6b5780b753a857dec087d363601e54f1515213fa.tar.bz2 forums-6b5780b753a857dec087d363601e54f1515213fa.tar.xz forums-6b5780b753a857dec087d363601e54f1515213fa.zip |
[ticket/10820] fix regex
Extract IE version from user agent string and then compare it with 7
PHPBB3-10820
Diffstat (limited to 'phpBB/download/file.php')
-rw-r--r-- | phpBB/download/file.php | 10 |
1 files changed, 9 insertions, 1 deletions
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 |