mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-05 10:49:37 +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:
parent
4c03d447a5
commit
54ccd127d7
1 changed files with 4 additions and 10 deletions
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue