diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-02-06 18:12:32 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-02-06 18:12:32 +0100 |
commit | be47e156a5afee8a20f60d278aab45bb84c282c2 (patch) | |
tree | da0432bc2eb4579d6b0a25877dcd23173b760f1e /lib/private | |
parent | 5ab12a8b85855ff01f4a3006a71ada2227d2a05a (diff) | |
parent | 0f1c587e6baaa201f01683b6adac8cc907c4f3e3 (diff) | |
download | nextcloud-server-be47e156a5afee8a20f60d278aab45bb84c282c2.tar.gz nextcloud-server-be47e156a5afee8a20f60d278aab45bb84c282c2.zip |
Merge pull request #6952 from MartialGeek/add_freebox_support
New user agent added for the Freebox.
Diffstat (limited to 'lib/private')
-rwxr-xr-x | lib/private/request.php | 1 | ||||
-rw-r--r-- | lib/private/response.php | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/request.php b/lib/private/request.php index d9d5ae08e28..2c5b907846e 100755 --- a/lib/private/request.php +++ b/lib/private/request.php @@ -11,6 +11,7 @@ class OC_Request { const USER_AGENT_IE = '/MSIE/'; // Android Chrome user agent: https://developers.google.com/chrome/mobile/docs/user-agent const USER_AGENT_ANDROID_MOBILE_CHROME = '#Android.*Chrome/[.0-9]*#'; + const USER_AGENT_FREEBOX = '#^Mozilla/5\.0$#'; /** * @brief Check overwrite condition diff --git a/lib/private/response.php b/lib/private/response.php index 04746437347..52dbb9d90f8 100644 --- a/lib/private/response.php +++ b/lib/private/response.php @@ -153,7 +153,11 @@ class OC_Response { * @param string $type disposition type, either 'attachment' or 'inline' */ static public function setContentDispositionHeader( $filename, $type = 'attachment' ) { - if (OC_Request::isUserAgent(array(OC_Request::USER_AGENT_IE, OC_Request::USER_AGENT_ANDROID_MOBILE_CHROME))) { + if (OC_Request::isUserAgent(array( + OC_Request::USER_AGENT_IE, + OC_Request::USER_AGENT_ANDROID_MOBILE_CHROME, + OC_Request::USER_AGENT_FREEBOX + ))) { header( 'Content-Disposition: ' . rawurlencode($type) . '; filename="' . rawurlencode( $filename ) . '"' ); } else { header( 'Content-Disposition: ' . rawurlencode($type) . '; filename*=UTF-8\'\'' . rawurlencode( $filename ) |