From fe0f414dc0211a4014581dc03fcfd514ed7ed02d Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Thu, 17 Oct 2024 10:56:01 +0200 Subject: Transition templating to Twig --- src/application/views/view_post.php | 150 ------------------------------------ 1 file changed, 150 deletions(-) delete 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 deleted file mode 100644 index e2fcc36..0000000 --- a/src/application/views/view_post.php +++ /dev/null @@ -1,150 +0,0 @@ - str_starts_with($m, "image/") || str_starts_with($m, "video/"); - -$fileAttachments = array_filter($attachments, fn(Attachment $a) => !$isImage($a->mimeType)); -$imageAttachments = array_filter($attachments, fn(Attachment $a) => $isImage($a->mimeType)); - -$canReply = !$topic->isLocked && ($GLOBALS["currentUser"]?->hasPermission(UserPermissions::CREATE_OWN_POST) ?? false); - -$canEdit = ($GLOBALS["currentUser"]?->id === $postAuthor?->id && $postAuthor?->hasPermission(UserPermissions::EDIT_OWN_POST)) - || ($GLOBALS["currentUser"]?->hasPermission(UserPermissions::EDIT_OTHER_POST)); - -$canEdit = $canEdit && !$topic->isLocked; - -$canDelete = ($GLOBALS["currentUser"]?->id === $postAuthor?->id && $postAuthor?->hasPermission(UserPermissions::DELETE_OWN_POST)) - || ($GLOBALS["currentUser"]?->hasPermission(UserPermissions::DELETE_OTHER_POST)); - -$canViewAttachments = $GLOBALS["currentUser"] !== null; - -$hide_actions ??= false; -$hide_pfp ??= false; -$your_are_the_author = $GLOBALS["currentUser"]?->id === $postAuthor?->id; -$is_op = $postAuthor?->id === $topicAuthor?->id && $postAuthor?->id !== null; - -?> - -deleted): ?> -