Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.415.2.15 diff -u -p -r1.415.2.15 theme.inc --- includes/theme.inc 22 Nov 2008 10:13:02 -0000 1.415.2.15 +++ includes/theme.inc 23 Nov 2008 05:13:06 -0000 @@ -759,6 +759,7 @@ function drupal_find_theme_functions($ca 'function' => $match, 'arguments' => $info['arguments'], 'original hook' => $hook, + 'pattern' => $info['pattern'], ); } } @@ -767,6 +768,12 @@ function drupal_find_theme_functions($ca $templates[$hook] = array( 'function' => $prefix .'_'. $hook, ); + // Ensure that the pattern is maintained from base themes to its sub-themes. + // Each sub-theme will have their functions scanned so the pattern must be + // held so for subsequent runs. + if (isset($info['pattern'])) { + $templates[$hook]['pattern'] = $info['pattern']; + } } } } @@ -832,6 +839,12 @@ function drupal_find_theme_templates($ca 'path' => dirname($file->filename), ); } + // Ensure that the pattern is maintained from base themes to its sub-themes. + // Each sub-theme will have their templates scanned so the pattern must be + // held so for subsequent runs. + if (isset($cache[$hook]['pattern'])) { + $templates[$hook]['pattern'] = $cache[$hook]['pattern']; + } } $patterns = array_keys($files);