summaryrefslogtreecommitdiffstats
path: root/lib/public/util.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/util.php')
-rw-r--r--lib/public/util.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/public/util.php b/lib/public/util.php
index 76b61347d46..2b81b6bfc49 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -670,4 +670,18 @@ class Util {
}
return self::$needUpgradeCache;
}
+
+ /**
+ * Returns whether the current request is coming from a
+ * famous awfully old browser.
+ *
+ * @return boolean true if it's IE8, false otherwise
+ */
+ public static function isIE8() {
+ preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $matches);
+ if (count($matches) > 0 && $matches[1] <= 9) {
+ return true;
+ }
+ return false;
+ }
}