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 10:03:35 -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)) { @@ -68,6 +68,14 @@ theme_add_style($stylesheet); } } + + load_theme($theme); +} + +function load_theme($theme){ + global $theme_engine; + + $themes = list_themes(); if (strpos($themes[$theme]->filename, '.theme')) { // file is a theme; include it 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 10:03:35 -0000 @@ -1028,12 +1028,17 @@ * Menu callback; display theme configuration for entire site and individual themes. */ function system_theme_settings($key = '') { - init_theme(); + global $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();