diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/TemplateLayout.php | 4 | ||||
-rw-r--r-- | lib/private/legacy/util.php | 10 | ||||
-rw-r--r-- | lib/public/Util.php | 9 |
3 files changed, 23 insertions, 0 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 1efdf8b441c..fc2e5798e1c 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -42,6 +42,7 @@ use OC\Template\JSCombiner; use OC\Template\JSConfigHelper; use OC\Template\SCSSCacher; use OCP\Defaults; +use OC\AppFramework\Http\Request; class TemplateLayout extends \OC_Template { @@ -61,6 +62,9 @@ class TemplateLayout extends \OC_Template { // yes - should be injected .... $this->config = \OC::$server->getConfig(); + if(\OCP\Util::isIE()) { + \OC_Util::addStyle('ie'); + } // Decide which page we show if($renderAs == 'user') { diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php index b285eb382e7..a581397212a 100644 --- a/lib/private/legacy/util.php +++ b/lib/private/legacy/util.php @@ -64,6 +64,7 @@ use OCP\IConfig; use OCP\IGroupManager; use OCP\ILogger; use OCP\IUser; +use OC\AppFramework\Http\Request; class OC_Util { public static $scripts = array(); @@ -1528,4 +1529,13 @@ class OC_Util { } } + /** + * is this Internet explorer ? + * + * @return boolean + */ + public static function isIe() { + return preg_match(Request::USER_AGENT_IE, $_SERVER['HTTP_USER_AGENT']) === 1; + } + } diff --git a/lib/public/Util.php b/lib/public/Util.php index 27b703ea2d8..df7211d6a80 100644 --- a/lib/public/Util.php +++ b/lib/public/Util.php @@ -558,4 +558,13 @@ class Util { } return self::$needUpgradeCache; } + + /** + * is this Internet explorer ? + * + * @return boolean + */ + public static function isIe() { + return \OC_Util::isIe(); + } } |