summaryrefslogtreecommitdiff
path: root/modules/system/system.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system/system.module')
-rw-r--r--modules/system/system.module38
1 files changed, 3 insertions, 35 deletions
diff --git a/modules/system/system.module b/modules/system/system.module
index 072850e01..48b2959c6 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -2553,7 +2553,7 @@ function _system_rebuild_theme_data() {
// Now that we've established all our master themes, go back and fill in data
// for subthemes.
foreach ($sub_themes as $key) {
- $themes[$key]->base_themes = system_find_base_themes($themes, $key);
+ $themes[$key]->base_themes = drupal_find_base_themes($themes, $key);
// Don't proceed if there was a problem with the root base theme.
if (!current($themes[$key]->base_themes)) {
continue;
@@ -2648,42 +2648,10 @@ function _system_default_theme_features() {
/**
* Find all the base themes for the specified theme.
*
- * Themes can inherit templates and function implementations from earlier themes.
- *
- * @param $themes
- * An array of available themes.
- * @param $key
- * The name of the theme whose base we are looking for.
- * @param $used_keys
- * A recursion parameter preventing endless loops.
- * @return
- * Returns an array of all of the theme's ancestors; the first element's value
- * will be NULL if an error occurred.
+ * This function has been deprecated in favor of drupal_find_base_themes().
*/
function system_find_base_themes($themes, $key, $used_keys = array()) {
- $base_key = $themes[$key]->info['base theme'];
- // Does the base theme exist?
- if (!isset($themes[$base_key])) {
- return array($base_key => NULL);
- }
-
- $current_base_theme = array($base_key => $themes[$base_key]->info['name']);
-
- // Is the base theme itself a child of another theme?
- if (isset($themes[$base_key]->info['base theme'])) {
- // Do we already know the base themes of this theme?
- if (isset($themes[$base_key]->base_themes)) {
- return $themes[$base_key]->base_themes + $current_base_theme;
- }
- // Prevent loops.
- if (!empty($used_keys[$base_key])) {
- return array($base_key => NULL);
- }
- $used_keys[$base_key] = TRUE;
- return system_find_base_themes($themes, $base_key, $used_keys) + $current_base_theme;
- }
- // If we get here, then this is our parent theme.
- return $current_base_theme;
+ return drupal_find_base_themes($themes, $key, $used_keys);
}
/**