]> git.mxchange.org Git - mailer.git/commitdiff
Variable naming convention applied, previous fix fixed ;)
authorRoland Häder <roland@mxchange.org>
Wed, 27 Aug 2008 22:09:07 +0000 (22:09 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 27 Aug 2008 22:09:07 +0000 (22:09 +0000)
inc/modules/admin/what-theme_edit.php
inc/mysql-connect.php
inc/theme-manager.php

index f3557895ac852b753d9430adeef9cda149784464..538a432e45eb3bb81c21d02812d8e66ba5c6faad 100644 (file)
@@ -40,7 +40,7 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin())) {
 // Add description as navigation point
 ADD_DESCR("admin", basename(__FILE__));
 
-global $CurrTheme;
+global $currTheme;
 
 // Check for selected themes
 $SEL = 0;
@@ -77,6 +77,10 @@ if ($SEL > 0) {
        // Set session
        set_session("mxchange_theme", $POST['default_theme']);
 
+       // Set it in config and current theme as well
+       $currTheme = $POST['default_theme'];
+       $_CONFIG['default_theme'] = $POST['default_theme'];
+
        // Save theme
        ADMIN_SAVE_SETTINGS($POST);
 }
@@ -96,7 +100,7 @@ if (SQL_NUMROWS($result) > 0)
 
                // Is the loaded theme name != current theme name?
                $LINK = $unix;
-               if ($unix != $CurrTheme) $LINK = "<A href=\"".URL."/modules.php?module=admin&amp;what=theme_edit&amp;default_theme=".$unix."\" title=\"".ADMIN_SET_AS_NEW_THEME."\">".$unix."</A>";
+               if ($unix != $currTheme) $LINK = "<A href=\"".URL."/modules.php?module=admin&amp;what=theme_edit&amp;default_theme=".$unix."\" title=\"".ADMIN_SET_AS_NEW_THEME."\">".$unix."</A>";
 
                // Prepare data for the row template
                $content = array(
index 49b40d35824e07f7bd2e82a3526a1c4b43820c56..bdfc0cd94aada47832ce84a84ef7d4da1d62c8a5 100644 (file)
@@ -155,7 +155,7 @@ LIMIT 1", __FILE__, __LINE__);
                                        UPDATE_ONLINE_LIST(get_session('PHPSESSID'), $GLOBALS['module'], $GLOBALS['action'], $GLOBALS['what']);
 
                                        // Load theme name
-                                       $CurrTheme = GET_CURR_THEME();
+                                       $currTheme = GET_CURR_THEME();
 
                                        // Set default 'what' value
                                        //* DEBUG */ echo "-".$GLOBALS['module']."/".$GLOBALS['what']."-<br />\n";
index 3eeee63dde45d33663d1891998663790ce9ef93d..a0145518ab90056ad03fc9f8b375763fadc40423 100644 (file)
@@ -97,7 +97,7 @@ function GET_CURR_THEME() {
 function THEME_SELECTION_BOX($mod, $act, $wht, $result)
 {
        // Construction URL
-       global $CurrTheme;
+       global $currTheme;
        $FORM = URL."/modules.php?module=".$mod;
        if (!empty($act)) $FORM .= "&amp;action=".$act;
        if (!empty($wht))   $FORM .= "&amp;what=".$wht;
@@ -131,7 +131,7 @@ function THEME_SELECTION_BOX($mod, $act, $wht, $result)
        foreach ($THEMES['theme_unix'] as $key=>$theme)
        {
                $OUT .= "  <OPTION value=\"".$theme."\"";
-               if ($theme == $CurrTheme) $OUT .= " selected=\"selected\"";
+               if ($theme == $currTheme) $OUT .= " selected=\"selected\"";
                $OUT .= ">".$THEMES['theme_name'][$key]."</OPTION>\n";
        }
 
@@ -142,11 +142,11 @@ function THEME_SELECTION_BOX($mod, $act, $wht, $result)
 }
 
 // Initialize variables
-$CurrTheme = GET_CURR_THEME();
+$currTheme = GET_CURR_THEME();
 if (empty($_POST['new_theme'])) $_POST['new_theme'] = "";
 
 // Check if new theme is selcted
-if ((!empty($_POST['new_theme'])) && ($_POST['new_theme'] != $CurrTheme))
+if ((!empty($_POST['new_theme'])) && ($_POST['new_theme'] != $currTheme))
 {
        // Set new theme for guests
        $NewTheme = $_POST['new_theme'];
@@ -155,7 +155,7 @@ if ((!empty($_POST['new_theme'])) && ($_POST['new_theme'] != $CurrTheme))
        set_session("mxchange_theme", $NewTheme);
 
        // Remove current from array and set new
-       $theme = PATH."theme/".$CurrTheme."/theme.php";
+       $theme = PATH."theme/".$currTheme."/theme.php";
        unset($INC_POOL[array_search($theme, $INC_POOL)]);
        $INC_POOL[] = PATH."theme/".$NewTheme."/theme.php";
 }