}
// Initialize variables
-$currTheme = GET_CURR_THEME();
+$GLOBALS['curr_theme'] = GET_CURR_THEME();
// Check if new theme is selcted
-if ((!empty($_POST['new_theme'])) && ($_POST['new_theme'] != $currTheme)) {
+if ((!empty($_POST['new_theme'])) && ($_POST['new_theme'] != $GLOBALS['curr_theme'])) {
// Set new theme for guests
$newTheme = $_POST['new_theme'];
set_session('mxchange_theme', $newTheme);
// Remove current from array and set new
- $theme = sprintf("%stheme/%s/theme.php", constant('PATH'), $currTheme);
+ $theme = sprintf("%stheme/%s/theme.php", constant('PATH'), $GLOBALS['curr_theme']);
unset($INC_POOL[array_search($theme, $INC_POOL)]);
$INC_POOL[] = sprintf("%stheme/%s/theme.php", constant('PATH'), $newTheme);
} // END - if