From 2098bf444afadcf0363d89b4cc1dca5d2213d754 Mon Sep 17 00:00:00 2001 From: cflip <36554078+cflip@users.noreply.github.com> Date: Sat, 24 Apr 2021 19:40:50 -0600 Subject: Remove all uses of db_inc.php This method of importing the database login every time wasn't very good. Now everything uses the new Database singleton class. --- viewcategory.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'viewcategory.php') diff --git a/viewcategory.php b/viewcategory.php index 70733da..852148b 100644 --- a/viewcategory.php +++ b/viewcategory.php @@ -1,6 +1,6 @@ get_from_database($_GET['id'], $dbc); - if ($result == 0) { + $result = $current->get_from_database($_GET['id']); + if (!$result) { http_response_code(404); include('includes/templates/404.php'); die(); @@ -37,10 +37,10 @@ if (!isset($_GET['id']) || !filter_var($_GET['id'], FILTER_VALIDATE_INT)) { Latest Post get_threads($dbc); + $threads = $current->get_threads(); foreach ($threads as $thread) { - $latest_post = $thread->get_latest_post($dbc); + $latest_post = $thread->get_latest_post(); echo ''; echo '' . $thread->subject . ''; -- cgit v1.2.3