mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-29 18:59:21 +02:00
Update forum.php
This commit is contained in:
parent
8857c30c7b
commit
d77e3b3db0
@ -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();
|
$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();
|
$boards = [];
|
||||||
foreach($info as $data)
|
foreach($info as $data) {
|
||||||
$counters[$data['section']] = array('threads' => $data['threads'], 'posts' => $data['replies'] + $data['threads']);
|
$counters[$data['section']] = array('threads' => $data['threads'], 'posts' => $data['replies'] + $data['threads']);
|
||||||
|
}
|
||||||
|
|
||||||
foreach($sections as $id => $section)
|
foreach($sections as $id => $section)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user