From 086e2d2668784469ec114f6e6fd2b3dace3d7c3b Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Thu, 12 Sep 2024 19:49:17 +0200 Subject: Way more progress on forum --- src/application/views/view_post.php | 86 +++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 src/application/views/view_post.php (limited to 'src/application/views/view_post.php') diff --git a/src/application/views/view_post.php b/src/application/views/view_post.php new file mode 100644 index 0000000..0776fb5 --- /dev/null +++ b/src/application/views/view_post.php @@ -0,0 +1,86 @@ + !str_starts_with($a->mimeType, "image/")); +$imageAttachments = array_filter($attachments, fn(Attachment $a) => str_starts_with($a->mimeType, "image/")); + +$canReply = $GLOBALS["currentUser"]?->hasPermission(UserPermissions::CREATE_OWN_POST) ?? false; + +$canDelete = ($GLOBALS["currentUser"]?->id === $postAuthor?->id && $postAuthor?->hasPermission(UserPermissions::DELETE_OWN_POST)) + || ($GLOBALS["currentUser"]?->hasPermission(UserPermissions::DELETE_OTHER_POST)); + +?> + +deleted): ?> +