It's not much but if you like rectangles, this is the code for you.
This commit is contained in:
parent
2745dfe0cd
commit
55d3979d2c
2 changed files with 3 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
require_once __DIR__ . '/../../misuzu.php';
|
||||
|
||||
$categories = forum_get_root_categories();
|
||||
$categories = forum_get_root_categories($app->getUserId());
|
||||
$blankForum = count($categories) <= 1 && $categories[0]['forum_children'] < 1;
|
||||
|
||||
foreach ($categories as $key => $category) {
|
||||
|
|
|
@ -76,7 +76,7 @@ function forum_fetch(int $forumId): array
|
|||
return $forums ? $forums : [];
|
||||
}
|
||||
|
||||
function forum_get_root_categories(): array
|
||||
function forum_get_root_categories(int $userId): array
|
||||
{
|
||||
$categories = Database::query('
|
||||
SELECT
|
||||
|
@ -99,6 +99,7 @@ function forum_get_root_categories(): array
|
|||
SELECT COUNT(`forum_id`)
|
||||
FROM `msz_forum_categories`
|
||||
WHERE `forum_parent` = ' . MSZ_FORUM_ROOT . '
|
||||
AND `forum_type` != 1
|
||||
')->fetchColumn();
|
||||
|
||||
return $categories;
|
||||
|
|
Loading…
Add table
Reference in a new issue