From cca60fa93f1979e052229391ee9f7085e076585a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 2 Apr 2015 07:19:37 +0000 Subject: [PATCH] ?download in WebDAV url did not trigger content-dispostion attachment header --- phpgwapi/inc/class.html.inc.php | 2 +- phpgwapi/inc/class.vfs_webdav_server.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index be1ad71cd5..c3e822c84e 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -1630,7 +1630,7 @@ egw_LAB.wait(function() { */ public static function content_disposition_header($fn,$forceDownload=true) { - if ($forceDownload===true) + if ($forceDownload) { $attachment = ' attachment;'; } diff --git a/phpgwapi/inc/class.vfs_webdav_server.inc.php b/phpgwapi/inc/class.vfs_webdav_server.inc.php index 48762610a9..3348b74a29 100644 --- a/phpgwapi/inc/class.vfs_webdav_server.inc.php +++ b/phpgwapi/inc/class.vfs_webdav_server.inc.php @@ -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); }