| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | public function canDownload() { |
||
| 10 | $member = Member::currentUser(); |
||
| 11 | $file = $this->owner; |
||
| 12 | $archive = DNDataArchive::get()->filter('ArchiveFileID', $file->ID)->First(); |
||
| 13 | |||
| 14 | if($archive) { |
||
| 15 | return $archive->canDownload($member); |
||
| 16 | } |
||
| 17 | |||
| 18 | return true; // By default, files can be downloaded from assets/ normally |
||
| 19 | } |
||
| 20 | } |
||
| 21 |