Initial release of attachment plugin for projects.
authorNik Okuntseff <support@anuko.com>
Sat, 30 Mar 2019 20:59:41 +0000 (20:59 +0000)
committerNik Okuntseff <support@anuko.com>
Sat, 30 Mar 2019 20:59:41 +0000 (20:59 +0000)
WEB-INF/templates/footer.tpl
WEB-INF/templates/plugins.tpl
file_download.php

index 32e6e26..3f192b3 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.61.4899 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.61.4900 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index 6dfd9d2..a88d3e8 100644 (file)
@@ -158,12 +158,10 @@ function handlePluginCheckboxes() {
             <td align="right" nowrap>{$forms.pluginsForm.templates.control}</td>
             <td><label for="templates">{$i18n.title.templates}</label> <span id="templates_conf"><a href="templates.php">{$i18n.label.configure}</a></span> <span id="templates_doc"><a href="https://www.anuko.com/lp/tt_29.htm" target="_blank">{$i18n.label.what_is_it}</a></span></td>
           </tr>
-{if isTrue('FILES_DEBUG')}
           <tr>
             <td align="right" nowrap>{$forms.pluginsForm.attachments.control}</td>
             <td><label for="attachments">{$i18n.label.attachments}</label> <span id="attachments_doc"><a href="https://www.anuko.com/lp/tt_31.htm" target="_blank">{$i18n.label.what_is_it}</a></span></td>
           </tr>
-{/if}
           <tr>
             <td colspan="2">&nbsp;</td>
           </tr>
index fb9239a..049003b 100644 (file)
@@ -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);