From faae3f3906575b9c72d628a5e48d03f943c794fc Mon Sep 17 00:00:00 2001 From: cflip <36554078+cflip@users.noreply.github.com> Date: Sat, 17 Apr 2021 17:36:18 -0600 Subject: Automatically sort threads without PHP comparisons --- viewcategory.php | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'viewcategory.php') diff --git a/viewcategory.php b/viewcategory.php index a10afce..e10797a 100644 --- a/viewcategory.php +++ b/viewcategory.php @@ -39,17 +39,7 @@ if (!isset($_GET['id']) || !filter_var($_GET['id'], FILTER_VALIDATE_INT)) { Latest Post date_lastpost); - $db = strtotime($b->date_lastpost); - - if ($da == $db) return 0; - - return ($da > $db) ? -1 : 1; - } - $threads = $current->get_threads($dbc); - usort($threads, "cmp"); foreach ($threads as $thread) { $latest_post = $thread->get_latest_post($dbc); -- cgit v1.2.3