Permalink
Browse files

MDL-39968 bootstrapbase: uses non-standard browser sniffing

Also theme_clean does the same sniffing, but is not necessary as its
included by bootstrapbase
  • Loading branch information...
1 parent 832aa7e commit 9a0e9776c08db032c7d3be7742654c855c869441 @danpoltawski danpoltawski committed with stronk7 May 31, 2013
Showing with 1 addition and 13 deletions.
  1. +1 −5 theme/bootstrapbase/config.php
  2. +0 −8 theme/clean/config.php
@@ -170,11 +170,7 @@
'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';
}
View
@@ -55,11 +55,3 @@
$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';
-}

0 comments on commit 9a0e977

Please sign in to comment.