diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2013-01-29 10:27:57 -0500 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-01-29 10:42:33 -0500 |
commit | 54ccd127d7b8300ec02d0ce71d0d33be63a6eef6 (patch) | |
tree | f4117b5d391e65e7e6212ce59f7b2c68d07ea8ae /lib/class | |
parent | 4c03d447a55950ee1ef6c4c914ec9fd9659dc95a (diff) | |
download | ampache-54ccd127d7b8300ec02d0ce71d0d33be63a6eef6.tar.gz ampache-54ccd127d7b8300ec02d0ce71d0d33be63a6eef6.tar.bz2 ampache-54ccd127d7b8300ec02d0ce71d0d33be63a6eef6.zip |
Use Horde_Browser for browser detection in Session
That's one of the reasons we have it, after all.
Diffstat (limited to 'lib/class')
-rw-r--r-- | lib/class/session.class.php | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/class/session.class.php b/lib/class/session.class.php index 7d7a4b59..68bc16e4 100644 --- a/lib/class/session.class.php +++ b/lib/class/session.class.php @@ -380,27 +380,21 @@ class Session { * ungimp_ie * * This function sets the cache limiting to public if you are running - * some flavor of IE. The detection used here is very conservative so - * feel free to fix it. This only has to be done if we're rolling HTTPS. + * some flavor of IE and not using HTTPS. */ public static function ungimp_ie() { - // If no https, no ungimpage required if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'on') { return true; } - // Try to detect IE - $agent = trim($_SERVER['HTTP_USER_AGENT']); - - if ((strpos($agent, 'MSIE') !== false) || - (strpos($agent,'Internet Explorer/') !== false)) { + $browser = new Horde_Browser(); + if ($browser->isBrowser('msie')) { session_cache_limiter('public'); } return true; - - } // ungimp_ie + } } ?> |