diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 05543be..6129c4f 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -572,9 +572,10 @@ function system_theme_settings($form, &$form_state, $key = '') { // Process the theme and all its base themes. foreach ($theme_keys as $theme) { // Include the theme-settings.php file. - $filename = DRUPAL_ROOT . '/' . str_replace("/$theme.info", '', $themes[$theme]->filename) . '/theme-settings.php'; - if (file_exists($filename)) { - require_once $filename; + $theme_settings_path = drupal_get_path('theme', $theme) . '/theme-settings.php'; + if (file_exists(DRUPAL_ROOT . '/' . $theme_settings_path)) { + require_once DRUPAL_ROOT . '/' . $theme_settings_path; + $form_state['build_info']['files'][] = $theme_settings_path; } // Call theme-specific settings.