]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/theme_functions.php
More globals rewritten, see #100
[mailer.git] / inc / libs / theme_functions.php
index 4a56e674ef2c6f2ff1dfbd0a1f4a6fbb85c02032..2dfcac22cb3b7e0e562b58950458878519f64e9a 100644 (file)
@@ -191,10 +191,10 @@ function GET_CURR_THEME_NAME () {
 }
 
 // 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'];
 
@@ -202,7 +202,7 @@ if ((!empty($_POST['new_theme'])) && ($_POST['new_theme'] != $currTheme)) {
        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