From 2953997e1511a31c45f67147cc64be791f4265a0 Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Tue, 10 Dec 2024 16:04:04 +0100 Subject: Don't include deleted posts in post list on profile --- src/application/actions/viewuser/get.php | 2 +- src/application/appdef.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/application') diff --git a/src/application/actions/viewuser/get.php b/src/application/actions/viewuser/get.php index e6dac43..55be586 100644 --- a/src/application/actions/viewuser/get.php +++ b/src/application/actions/viewuser/get.php @@ -4,7 +4,7 @@ use mystic\forum\orm\Attachment; use mystic\forum\orm\Post; use mystic\forum\orm\Topic; -$posts = $db->fetchCustom(Post::class, 'WHERE author_id = $1 ORDER BY post_date DESC', [ $userId ]); +$posts = $db->fetchCustom(Post::class, 'WHERE author_id = $1 AND deleted = false ORDER BY post_date DESC', [ $userId ]); $topics = []; $attachments = []; foreach ($posts as $item) { diff --git a/src/application/appdef.php b/src/application/appdef.php index 7cddfff..33a0807 100644 --- a/src/application/appdef.php +++ b/src/application/appdef.php @@ -1,3 +1,3 @@