From cb8ccb74269691a232576cb3da31b3d4525f125e Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sat, 5 Apr 2025 21:33:02 +0300 Subject: [PATCH] Update functions.php --- library/includes/functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/includes/functions.php b/library/includes/functions.php index 0e1a2117a..2eaf182dc 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -898,13 +898,16 @@ function bb_get_config($table, $from_db = false, $update_cache = true) { if ($from_db or !$cfg = CACHE('bb_config')->get("config_{$table}")) { $cfg = []; + foreach (DB()->fetch_rowset("SELECT * FROM $table") as $row) { $cfg[$row['config_name']] = $row['config_value']; } + if ($update_cache) { CACHE('bb_config')->set("config_{$table}", $cfg); } } + return $cfg; }