From: Nik Okuntseff Date: Sun, 7 Apr 2019 15:54:38 +0000 (+0000) Subject: Fixed file_download.php. X-Git-Tag: timetracker_1.19-1~116 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=808a0138db74b0012c4ce139ed6d5cc9d657028c;p=timetracker.git Fixed file_download.php. --- diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 96f2ae3e..fdfaf89a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.18.64.4918 | Copyright © Anuko | +  Anuko Time Tracker 1.18.64.4919 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/file_download.php b/file_download.php index 8a17b4d7..e4d35c70 100644 --- a/file_download.php +++ b/file_download.php @@ -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(); }