From a9c35844c782b4d8f3cc91411b16dfcfa051dab7 Mon Sep 17 00:00:00 2001 From: czaks Date: Mon, 21 Apr 2014 15:38:18 +0200 Subject: [PATCH] fix themes resetting the board --- inc/functions.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index 14f874c5..820ee838 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -326,13 +326,23 @@ function create_antibot($board, $thread = null) { return _create_antibot($board, $thread); } -function rebuildThemes($action, $board = false) { +function rebuildThemes($action, $boardname = false) { + global $config, $board; + + // Save the global variables + $_config = $config; + $_board = $board; + // List themes $query = query("SELECT `theme` FROM ``theme_settings`` WHERE `name` IS NULL AND `value` IS NULL") or error(db_error()); while ($theme = $query->fetch(PDO::FETCH_ASSOC)) { - rebuildTheme($theme['theme'], $action, $board); + rebuildTheme($theme['theme'], $action, $boardname); } + + // Restore them + $config = $_config; + $board = $_board; }