aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_download.php
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2013-05-12 16:09:01 +0530
committerDhruv <dhruv.goel92@gmail.com>2013-05-12 16:09:01 +0530
commitd522dc5372cc8060245e5f81bcf759bf1bfc5c57 (patch)
treebada036f963f9a590dbefe16ec984c76502e593f /phpBB/includes/functions_download.php
parentbcd6f79d5c3e3db5ae60098526d93b477cc9eed9 (diff)
parentcae8c3603758cff7a75d8bbb3b5d15bae38e5692 (diff)
downloadforums-d522dc5372cc8060245e5f81bcf759bf1bfc5c57.tar
forums-d522dc5372cc8060245e5f81bcf759bf1bfc5c57.tar.gz
forums-d522dc5372cc8060245e5f81bcf759bf1bfc5c57.tar.bz2
forums-d522dc5372cc8060245e5f81bcf759bf1bfc5c57.tar.xz
forums-d522dc5372cc8060245e5f81bcf759bf1bfc5c57.zip
Merge branch 'ticket/10820' into ticket/10820-develop
* ticket/10820: [ticket/10820] fix regex Extract IE version from user agent string and then compare it with 7 Conflicts: phpBB/download/file.php
Diffstat (limited to 'phpBB/includes/functions_download.php')
-rw-r--r--phpBB/includes/functions_download.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php
index 949c47487b..5947eecaac 100644
--- a/phpBB/includes/functions_download.php
+++ b/phpBB/includes/functions_download.php
@@ -731,5 +731,13 @@ function phpbb_download_clean_filename($filename)
*/
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;
+ }
}