From: Nik Okuntseff Date: Sat, 30 Mar 2019 20:59:41 +0000 (+0000) Subject: Initial release of attachment plugin for projects. X-Git-Tag: timetracker_1.19-1~137 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0b4060bf33c9316f79a07f870c5b1584b785e6dd;p=timetracker.git Initial release of attachment plugin for projects. --- diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 32e6e264..3f192b30 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- -{if isTrue('FILES_DEBUG')} -{/if} diff --git a/file_download.php b/file_download.php index fb9239ab..049003ba 100644 --- a/file_download.php +++ b/file_download.php @@ -55,14 +55,11 @@ if ($file['entity_type'] != 'project') { $fileHelper = new ttFileHelper($err); -$filename = $file['file_name']; -$mime_type = 'image/jpeg'; // Hardcoded type for now. TODO: fix this. - if ($fileHelper->getFile($file)) { header('Pragma: public'); // This is needed for IE8 to download files over https. - header('Content-Type: '.$mime_type); + header('Content-Type: application/octet-stream'); header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); - header('Content-Disposition: attachment; filename="'.$filename.'"'); + header('Content-Disposition: attachment; filename="'.$file['file_name'].'"'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Cache-Control: private', false);
 Anuko Time Tracker 1.18.61.4899 | Copyright © Anuko | +  Anuko Time Tracker 1.18.61.4900 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/plugins.tpl b/WEB-INF/templates/plugins.tpl index 6dfd9d24..a88d3e8d 100644 --- a/WEB-INF/templates/plugins.tpl +++ b/WEB-INF/templates/plugins.tpl @@ -158,12 +158,10 @@ function handlePluginCheckboxes() { {$forms.pluginsForm.templates.control} {$i18n.label.configure} {$i18n.label.what_is_it}
{$forms.pluginsForm.attachments.control} {$i18n.label.what_is_it}