Fixed file_download.php.
authorNik Okuntseff <support@anuko.com>
Sun, 7 Apr 2019 15:54:38 +0000 (15:54 +0000)
committerNik Okuntseff <support@anuko.com>
Sun, 7 Apr 2019 15:54:38 +0000 (15:54 +0000)
WEB-INF/templates/footer.tpl
file_download.php

index 96f2ae3..fdfaf89 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.64.4918 | 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.64.4919 | 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 8a17b4d..e4d35c7 100644 (file)
@@ -29,6 +29,7 @@
 require_once('initialize.php');
 import('form.Form');
 import('ttFileHelper');
+import('ttTimeHelper');
 import('ttProjectHelper');
 
 // Access checks.
@@ -41,7 +42,7 @@ if (!$file) {
 // Entity-specific checks.
 $entity_type = $file['entity_type'];
 if ($entity_type == 'time') {
-  if (!(ttAccessAllowed('track_own_time') || ttAccessAllowed('track_time')) || !ttTimeHelper::getRecord($file['entity_id'])) {
+  if (!(ttAccessAllowed('track_own_time') || ttAccessAllowed('track_time')) || !ttTimeHelper::getRecordForFileView($file['entity_id'])) {
     header('Location: access_denied.php');
     exit();
   }