mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
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
This commit is contained in:
commit
d522dc5372
1 changed files with 9 additions and 1 deletions
|
@ -731,5 +731,13 @@ function phpbb_download_clean_filename($filename)
|
||||||
*/
|
*/
|
||||||
function phpbb_is_greater_ie7($user_agent)
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue