From 2458ca6964401c0bd2cd809d303dfbcaea3ead90 Mon Sep 17 00:00:00 2001 From: cflip <36554078+cflip@users.noreply.github.com> Date: Wed, 11 Aug 2021 15:14:18 -0600 Subject: Add getters for nested objects --- viewthread.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'viewthread.php') diff --git a/viewthread.php b/viewthread.php index 06debe8..d0a387e 100755 --- a/viewthread.php +++ b/viewthread.php @@ -27,13 +27,12 @@ if (!$current->has_value()) { -

subject; ?>

- created by author->name; ?> - in category->name; ?>, date_created)); ?> + created by get_author()->name; ?> + in get_parent_category()->name; ?>, date_created)); ?> is_signed_in() and Session::get()->get_current_user()->level == USER_LEVEL_MODERATOR): ?> Moderator Options @@ -59,7 +58,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (empty($post_content) or !$post_content) { trigger_error('Reply cannot be empty'); } else { - Post::create($post_content, $current->id, $current->category->id); + Post::create($post_content, $current->id, $current->category_id); header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $current->id); } } -- cgit v1.2.3