Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.288 diff -u -r1.288 theme.inc --- includes/theme.inc 6 Apr 2006 02:35:57 -0000 1.288 +++ includes/theme.inc 7 Apr 2006 06:14:53 -0000 @@ -30,7 +30,7 @@ * */ function init_theme() { - global $theme, $user, $custom_theme, $theme_engine, $theme_key; + global $theme, $user, $custom_theme, $theme_key; // If $theme is already set, assume the others are set, too, and do nothing if (isset($theme)) { @@ -50,7 +50,13 @@ // Store the identifier for retrieving theme settings with. $theme_key = $theme; + load_theme($theme); +} +function load_theme($theme){ + global $theme_engine; + + $themes = list_themes(); // If we're using a style, load its appropriate theme, // which is stored in the style's description field. // Also load the stylesheet using theme_add_style(). Index: modules/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system.module,v retrieving revision 1.308 diff -u -r1.308 system.module --- modules/system.module 6 Apr 2006 18:07:22 -0000 1.308 +++ modules/system.module 7 Apr 2006 06:14:53 -0000 @@ -1028,12 +1028,17 @@ * Menu callback; display theme configuration for entire site and individual themes. */ function system_theme_settings($key = '') { + global $theme; + init_theme(); $directory_path = file_directory_path(); file_check_directory($directory_path, FILE_CREATE_DIRECTORY, 'file_directory_path'); // Default settings are defined in theme_get_settings() in includes/theme.inc if ($key) { + if ($key<>$theme){ + load_theme($key); + } $settings = theme_get_settings($key); $var = str_replace('/', '_', 'theme_'. $key .'_settings'); $themes = system_theme_data();