1 | <?php |
||
17 | class PostAttachment extends File |
||
18 | { |
||
19 | |||
20 | private static $has_one = array( |
||
21 | "Post" => "Post" |
||
22 | ); |
||
23 | |||
24 | private static $defaults = array( |
||
25 | 'ShowInSearch' => 0 |
||
26 | ); |
||
27 | |||
28 | /** |
||
29 | * Can a user delete this attachment |
||
30 | * |
||
31 | * @return bool |
||
32 | */ |
||
33 | public function canDelete($member = null) |
||
41 | |||
42 | /** |
||
43 | * Can a user edit this attachement |
||
44 | * |
||
45 | * @return bool |
||
46 | */ |
||
47 | public function canEdit($member = null) |
||
55 | |||
56 | /** |
||
57 | * Allows the user to download a file without right-clicking |
||
58 | */ |
||
59 | public function download() |
||
75 | } |
||
76 |