?download in WebDAV url did not trigger content-dispostion attachment header

This commit is contained in:
Ralf Becker 2015-04-02 07:20:02 +00:00
parent f01ab4e665
commit 5a42714aee
2 changed files with 2 additions and 2 deletions

View File

@ -1630,7 +1630,7 @@ egw_LAB.wait(function() {
*/
public static function content_disposition_header($fn,$forceDownload=true)
{
if ($forceDownload===true)
if ($forceDownload)
{
$attachment = ' attachment;';
}

View File

@ -627,7 +627,7 @@ class vfs_webdav_server extends HTTP_WebDAV_Server_Filesystem
*/
function __construct()
{
if ($_SERVER['REQUEST_METHOD'] == 'GET' && ($this->force_download = strpos($_SERVER['REQUEST_URI'],'?download')))
if ($_SERVER['REQUEST_METHOD'] == 'GET' && ($this->force_download = strpos($_SERVER['REQUEST_URI'],'?download') !== false))
{
$_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'],0,$this->force_download);
}