1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-05 02:39:47 +02:00

Use Horde_Browser for browser detection in Session

That's one of the reasons we have it, after all.
This commit is contained in:
Paul Arthur 2013-01-29 10:27:57 -05:00
parent 4c03d447a5
commit 54ccd127d7

View file

@ -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
}
}
?>