From 85f8abf5376ce3b54b1d10476eb5b87a55705540 Mon Sep 17 00:00:00 2001 From: danpros Date: Fri, 26 Jan 2024 15:32:06 +0700 Subject: [PATCH] Update functions.php --- system/includes/functions.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/system/includes/functions.php b/system/includes/functions.php index aa661dc..e40d92e 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -875,6 +875,8 @@ function get_category_info($category = null) } } } + } else { + $tmp[] = default_category($category); } return $tmp; } @@ -929,7 +931,16 @@ function default_category($category = null) $tmp = array(); $desc = new stdClass; - if ($category == 'uncategorized') { + if (is_null($category)) { + $desc->title = i18n("Uncategorized"); + $desc->url = site_url() . 'category/uncategorized'; + $desc->slug = 'uncategorized'; + $desc->body = '

' . i18n('Uncategorized_comment') . '

'; + $desc->md = 'uncategorized.md'; + $desc->description = i18n('Uncategorized_comment'); + $desc->file = ''; + $desc->count = get_categorycount($desc->slug); + } elseif ($category == 'uncategorized') { $desc->title = i18n("Uncategorized"); $desc->url = site_url() . 'category/uncategorized'; $desc->slug = 'uncategorized';