From d77e3b3db0b20c1a705970444eee4e1052d8504c Mon Sep 17 00:00:00 2001 From: slawkens Date: Sun, 16 Mar 2025 09:41:08 +0100 Subject: [PATCH] Update forum.php --- system/pages/forum.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/pages/forum.php b/system/pages/forum.php index 51a078ae..49e1e41a 100644 --- a/system/pages/forum.php +++ b/system/pages/forum.php @@ -39,9 +39,10 @@ if(!empty($action)) $info = $db->query("SELECT `section`, COUNT(`id`) AS 'threads', SUM(`replies`) AS 'replies' FROM `" . FORUM_TABLE_PREFIX . "forum` WHERE `first_post` = `id` GROUP BY `section`")->fetchAll(); -$boards = array(); -foreach($info as $data) +$boards = []; +foreach($info as $data) { $counters[$data['section']] = array('threads' => $data['threads'], 'posts' => $data['replies'] + $data['threads']); +} foreach($sections as $id => $section) {