summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2014-04-21 15:38:18 +0200
committerczaks <marcin@6irc.net>2014-04-21 15:38:18 +0200
commita9c35844c782b4d8f3cc91411b16dfcfa051dab7 (patch)
treee94ba6c050740588c6837c65dec14b6a256a9ce5 /inc
parent4a3dd0cfd683e9ab8eb5caf453e3f28df5edae01 (diff)
fix themes resetting the board
Diffstat (limited to 'inc')
-rw-r--r--inc/functions.php14
1 files 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;
}