diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-12-07 09:32:58 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-12-07 09:32:58 +0000 |
commit | 372846e1dcac8f28ce0ace61c0e7da3993f23cef (patch) | |
tree | 8b59ecd2746a8d3dc60aeb107a2e17236f0a691c /includes | |
parent | fcb68d747e6b61e79da6afe573619720ba6baf80 (diff) | |
download | brdo-372846e1dcac8f28ce0ace61c0e7da3993f23cef.tar.gz brdo-372846e1dcac8f28ce0ace61c0e7da3993f23cef.tar.bz2 |
#333060 by merlinofchaos, dvessel, neclimdul: Prevent parent theme clobbering.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/theme.inc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 4243f0d79..52725b9df 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -776,6 +776,12 @@ function drupal_find_theme_functions($cache, $prefixes) { $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 for subsequent runs. + if (isset($info['pattern'])) { + $templates[$hook]['pattern'] = $info['pattern']; + } } } } @@ -841,6 +847,12 @@ function drupal_find_theme_templates($cache, $extension, $path) { '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 for subsequent runs. + if (isset($cache[$hook]['pattern'])) { + $templates[$hook]['pattern'] = $cache[$hook]['pattern']; + } } $patterns = array_keys($files); |