summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngie Byron2008-12-07 09:32:58 (GMT)
committerAngie Byron2008-12-07 09:32:58 (GMT)
commit372846e1dcac8f28ce0ace61c0e7da3993f23cef (patch)
tree8b59ecd2746a8d3dc60aeb107a2e17236f0a691c
parentfcb68d747e6b61e79da6afe573619720ba6baf80 (diff)
#333060 by merlinofchaos, dvessel, neclimdul: Prevent parent theme clobbering.
-rw-r--r--includes/theme.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index 4243f0d..52725b9 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);