From 89d04ea78a1d422b2dc21cd9e6e10344674632a1 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Tue, 13 Oct 2009 05:26:57 +0000 Subject: #561452 by pwolanin and David_Rothstein: Add API function to get module/theme info without rebuilding it. --- includes/common.inc | 4 ++-- includes/install.inc | 4 ++-- includes/registry.inc | 2 +- includes/theme.inc | 4 ++-- includes/update.inc | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'includes') diff --git a/includes/common.inc b/includes/common.inc index 8532e46c7..aac56ef14 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -5527,10 +5527,10 @@ function drupal_flush_all_caches() { // If invoked from update.php, we must not update the theme information in the // database, or this will result in all themes being disabled. if (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update') { - _system_get_theme_data(); + _system_rebuild_theme_data(); } else { - system_get_theme_data(); + system_rebuild_theme_data(); } drupal_theme_rebuild(); diff --git a/includes/install.inc b/includes/install.inc index 2e1f256d8..69e49c951 100644 --- a/includes/install.inc +++ b/includes/install.inc @@ -559,7 +559,7 @@ function drupal_verify_profile($install_state) { * Normally just testing wants to set this to TRUE. */ function drupal_install_modules($module_list = array(), $disable_modules_installed_hook = FALSE) { - $files = system_get_module_data(); + $files = system_rebuild_module_data(); $module_list = array_flip(array_values($module_list)); do { $moved = FALSE; @@ -654,7 +654,7 @@ function drupal_install_system() { ->execute(); // Now that we've installed things properly, bootstrap the full Drupal environment drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); - system_get_module_data(); + system_rebuild_module_data(); } /** diff --git a/includes/registry.inc b/includes/registry.inc index cf2c09757..2bc98e0b1 100644 --- a/includes/registry.inc +++ b/includes/registry.inc @@ -35,7 +35,7 @@ function _registry_rebuild() { require_once DRUPAL_ROOT . '/includes/database/' . $driver . '/query.inc'; // Get current list of modules and their files. - $modules = system_get_module_data(); + $modules = system_rebuild_module_data(); // Get the list of files we are going to parse. $files = array(); foreach ($modules as &$module) { diff --git a/includes/theme.inc b/includes/theme.inc index f17f10155..6edb3c735 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -569,7 +569,7 @@ function list_themes($refresh = FALSE) { } else { // Scan the installation when the database should not be read. - $themes = _system_get_theme_data(); + $themes = _system_rebuild_theme_data(); } foreach ($themes as $theme) { @@ -2342,7 +2342,7 @@ function template_preprocess_maintenance_page(&$variables) { global $theme; // Retrieve the theme data to list all available regions. - $theme_data = _system_get_theme_data(); + $theme_data = _system_rebuild_theme_data(); $regions = $theme_data[$theme]->info['regions']; // Get all region content set with drupal_add_region_content(). diff --git a/includes/update.inc b/includes/update.inc index a4005d3ef..f66e734c4 100644 --- a/includes/update.inc +++ b/includes/update.inc @@ -37,8 +37,8 @@ function update_check_incompatibility($name, $type = 'module') { // Store values of expensive functions for future use. if (empty($themes) || empty($modules)) { - $themes = _system_get_theme_data(); - $modules = system_get_module_data(); + $themes = _system_rebuild_theme_data(); + $modules = system_rebuild_module_data(); } if ($type == 'module' && isset($modules[$name])) { -- cgit v1.2.3