Commit 372846e1 authored by webchick's avatar webchick

#333060 by merlinofchaos, dvessel, neclimdul: Prevent parent theme clobbering.

parent fcb68d74
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment