diff options
Diffstat (limited to 'lib/private/response.php')
-rw-r--r-- | lib/private/response.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/private/response.php b/lib/private/response.php index cf18115111a..9be5d75c314 100644 --- a/lib/private/response.php +++ b/lib/private/response.php @@ -158,11 +158,12 @@ 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, - OC_Request::USER_AGENT_FREEBOX - ))) { + if (\OC::$server->getRequest()->isUserAgent( + [ + \OC\AppFramework\Http\Request::USER_AGENT_IE, + \OC\AppFramework\Http\Request::USER_AGENT_ANDROID_MOBILE_CHROME, + \OC\AppFramework\Http\Request::USER_AGENT_FREEBOX, + ])) { header( 'Content-Disposition: ' . rawurlencode($type) . '; filename="' . rawurlencode( $filename ) . '"' ); } else { header( 'Content-Disposition: ' . rawurlencode($type) . '; filename*=UTF-8\'\'' . rawurlencode( $filename ) |