Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.616
diff -u -p -r1.616 system.module
--- modules/system/system.module	5 Sep 2008 09:29:06 -0000	1.616
+++ modules/system/system.module	5 Sep 2008 21:34:54 -0000
@@ -1001,18 +1001,26 @@ function _system_theme_data() {
     $engines = drupal_system_listing('\.engine$', 'themes/engines');
 
     $defaults = system_theme_default();
+    // These keys are used to conditionaly carried over theme data from the base theme.
+    $sub_theme_info_inherit = array('regions', 'features', 'core', 'php');
 
     $sub_themes = array();
     // Read info files for each theme
     foreach ($themes as $key => $theme) {
-      $themes[$key]->info = drupal_parse_info_file($theme->filename) + $defaults;
+      $theme_info = drupal_parse_info_file($theme->filename);
 
       // Invoke hook_system_info_alter() to give installed modules a chance to
       // modify the data in the .info files if necessary.
-      drupal_alter('system_info', $themes[$key]->info, $themes[$key]);
+      drupal_alter('system_info', $theme_info, $themes[$key]);
+      // Merge defaults with the parsed data. This comes after drupal_alter() so
+      // it is easier to determine what was actually defined in the .info file.
+      $themes[$key]->info = $theme_info + $defaults;
 
+      // Build an array of sub-theme information to be processed separately.
       if (!empty($themes[$key]->info['base theme'])) {
-        $sub_themes[] = $key;
+        foreach ($sub_theme_info_inherit as $info_key) {
+          $sub_themes[$key][$info_key] = isset($theme_info[$info_key]);
+        }
       }
       if (empty($themes[$key]->info['engine'])) {
         $filename = dirname($themes[$key]->filename) . '/' . $themes[$key]->name . '.theme';
@@ -1053,7 +1061,8 @@ function _system_theme_data() {
 
     // Now that we've established all our master themes, go back and fill in
     // data for subthemes.
-    foreach ($sub_themes as $key) {
+    foreach ($sub_themes as $key => $info_keys) {
+      // Get the top level base theme.
       $base_key = system_find_base_theme($themes, $key);
       if (!$base_key) {
         continue;
@@ -1070,6 +1079,23 @@ function _system_theme_data() {
           $themes[$key]->prefix = $key;
         }
       }
+      // Get the immediate parent theme.
+      $base_theme = $themes[$theme_key]->info['base theme'];
+      // Process .info data so they are properly inherited. This needs two passes.
+      foreach ($info_keys as $info_key => $info_set) {
+        if (!$info_set && isset($themes[$base_theme]->info[$info_key])) {
+          $themes[$key]->info[$info_key] = $themes[$base_theme]->info[$info_key];
+        }
+      }
+    }
+    // Second pass of the above to ensure everything is carried over.
+    foreach ($sub_themes as $theme_key => $info_keys) {
+      $base_theme = $themes[$theme_key]->info['base theme'];
+      foreach ($info_keys as $info_key => $info_set) {
+        if (!$info_set && isset($themes[$base_theme]->info[$info_key])) {
+          $themes[$key]->info[$info_key] = $themes[$base_theme]->info[$info_key];
+        }
+      }
     }
 
     $themes_info = $themes;
