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 13:39:49 -0000 @@ -1028,7 +1028,6 @@ * Menu callback; display theme configuration for entire site and individual themes. */ function system_theme_settings($key = '') { - init_theme(); $directory_path = file_directory_path(); file_check_directory($directory_path, FILE_CREATE_DIRECTORY, 'file_directory_path'); @@ -1190,17 +1189,16 @@ } if ($key) { + // Switch themes to enable phptemplate theme specific settings + global $theme, $custom_theme; + + $custom_theme = $key; + init_theme(); + // Template-specific settings $function = $themes[$key]->prefix .'_settings'; - if (function_exists($function)) { - if ($themes[$key]->template) { - // file is a template or a style of a template - $form['specific'] = array('#type' => 'fieldset', '#title' => t('Engine-specific settings'), '#description' => t('These settings only exist for all the templates and styles based on the %engine theme engine.', array('%engine' => $themes[$key]->prefix))); - } - else { - // file is a theme or a style of a theme - $form['specific'] = array('#type' => 'fieldset', '#title' => t('Theme-specific settings'), '#description' => t('These settings only exist for the %theme theme and all the styles based on it.', array('%theme' => $themes[$key]->prefix))); - } + if (function_exists($function)) { + $form['specific'] = array('#type' => 'fieldset', '#title' => t('Theme-specific settings'), '#description' => t('These settings only exist for the %theme theme and all the styles based on it.', array('%theme' => $theme))); $group = $function(); $form['specific'] = array_merge($form['specific'], (is_array($group) ? $group : array())); }