// Add description as navigation point
ADD_DESCR("admin", basename(__FILE__));
-global $CurrTheme;
+global $currTheme;
// Check for selected themes
$SEL = 0;
// Shall I de-/activate or delete themes?
if (isset($_POST['status'])) {
// Change status
- if ($_POST['active'][$id] == 'Y') {
+ if ($_POST['active'][$id] == "Y") {
$SQL = "UPDATE "._MYSQL_PREFIX."_themes SET theme_active='N' WHERE id='".$id."' LIMIT 1";
} else {
$SQL = "UPDATE "._MYSQL_PREFIX."_themes SET theme_active='Y' WHERE id='".$id."' LIMIT 1";
// 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);
}
// Is the loaded theme name != current theme name?
$LINK = $unix;
- if ($unix != $CurrTheme) $LINK = "<A href=\"".URL."/modules.php?module=admin&what=theme_edit&default_theme=".$unix."\" title=\"".ADMIN_SET_AS_NEW_THEME."\">".$unix."</A>";
+ if ($unix != $currTheme) $LINK = "<A href=\"".URL."/modules.php?module=admin&what=theme_edit&default_theme=".$unix."\" title=\"".ADMIN_SET_AS_NEW_THEME."\">".$unix."</A>";
// Prepare data for the row template
$content = array(