From 0127e6d07cb47618a8de8a13d6ed0144ee3453ba Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 2 Apr 2015 10:46:53 +0000 Subject: [PATCH] fix not working customized etemplates after fix with content-disposition attachment, we now only set it for urls ending with "?download", not for "?download=something" --- phpgwapi/inc/class.vfs_webdav_server.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.vfs_webdav_server.inc.php b/phpgwapi/inc/class.vfs_webdav_server.inc.php index 3348b74a29..a3740ae64d 100644 --- a/phpgwapi/inc/class.vfs_webdav_server.inc.php +++ b/phpgwapi/inc/class.vfs_webdav_server.inc.php @@ -627,7 +627,9 @@ class vfs_webdav_server extends HTTP_WebDAV_Server_Filesystem */ function __construct() { - if ($_SERVER['REQUEST_METHOD'] == 'GET' && ($this->force_download = strpos($_SERVER['REQUEST_URI'],'?download') !== false)) + if ($_SERVER['REQUEST_METHOD'] == 'GET' && ($this->force_download = strpos($_SERVER['REQUEST_URI'],'?download') !== false && + // do NOT send content-disposition attachment for etemplates containing ?download=$timestamp + strpos($_SERVER['REQUEST_URI'],'?download=') === false)) { $_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'],0,$this->force_download); }