From 47f8148951cfcde42aa15ea1b972fa1e61e87b6e Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sun, 21 Jan 2024 11:26:00 +0700 Subject: [PATCH] Update functions.php --- library/includes/functions.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library/includes/functions.php b/library/includes/functions.php index f3ffdbab..d34e382c 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -2136,8 +2136,13 @@ function get_topic_title ($topic_id) return $row['topic_title']; } -function forum_exists ($forum_id) +function forum_exists ($forum_id = null) { + if (!isset($forum_id)) + { + return DB()->fetch_row("SELECT * FROM " . BB_FORUMS . " LIMIT 1"); + } + return DB()->fetch_row("SELECT forum_id FROM ". BB_FORUMS ." WHERE forum_id = $forum_id LIMIT 1"); }