diff --git a/theme/bootstrapbase/config.php b/theme/bootstrapbase/config.php index aba395fbbef..1c641a711b4 100644 --- a/theme/bootstrapbase/config.php +++ b/theme/bootstrapbase/config.php @@ -170,11 +170,7 @@ $THEME->javascripts_footer = array( 'moodlebootstrap', ); -$useragent = ''; -if (!empty($_SERVER['HTTP_USER_AGENT'])) { - $useragent = $_SERVER['HTTP_USER_AGENT']; -} -if (strpos($useragent, 'MSIE 8') || strpos($useragent, 'MSIE 7')) { +if (check_browser_version('MSIE') && !check_browser_version('MSIE', '9.0')) { $THEME->javascripts[] = 'html5shiv'; } diff --git a/theme/clean/config.php b/theme/clean/config.php index 0517f379038..d13ea7446e1 100644 --- a/theme/clean/config.php +++ b/theme/clean/config.php @@ -55,11 +55,3 @@ $THEME->plugins_exclude_sheets = array( $THEME->rendererfactory = 'theme_overridden_renderer_factory'; $THEME->csspostprocess = 'clean_process_css'; - -$useragent = ''; -if (!empty($_SERVER['HTTP_USER_AGENT'])) { - $useragent = $_SERVER['HTTP_USER_AGENT']; -} -if (strpos($useragent, 'MSIE 8') || strpos($useragent, 'MSIE 7')) { - $THEME->javascripts[] = 'html5shiv'; -}