summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc11
-rw-r--r--includes/install.core.inc5
-rw-r--r--includes/theme.inc2
-rw-r--r--includes/update.inc5
4 files changed, 7 insertions, 16 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 3460d1ad1..ecb89071e 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -6071,16 +6071,7 @@ function drupal_flush_all_caches() {
registry_rebuild();
drupal_clear_css_cache();
drupal_clear_js_cache();
-
- // 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_rebuild_theme_data();
- }
- else {
- system_rebuild_theme_data();
- }
-
+ system_rebuild_theme_data();
drupal_theme_rebuild();
menu_rebuild();
node_types_rebuild();
diff --git a/includes/install.core.inc b/includes/install.core.inc
index 1dbe9e2f8..8f626f677 100644
--- a/includes/install.core.inc
+++ b/includes/install.core.inc
@@ -1472,10 +1472,7 @@ function install_finished(&$install_state) {
$output .= '<p>' . (isset($messages['error']) ? st('Review the messages above before visiting <a href="@url">your new site</a>.', array('@url' => url(''))) : st('<a href="@url">Visit your new site</a>.', array('@url' => url('')))) . '</p>';
// Rebuild the module and theme data, in case any newly-installed modules
- // need to modify it via hook_system_info_alter(). We need to clear the
- // theme static cache first, to make sure that the theme data is actually
- // rebuilt.
- drupal_static_reset('_system_rebuild_theme_data');
+ // need to modify it via hook_system_info_alter().
system_rebuild_module_data();
system_rebuild_theme_data();
diff --git a/includes/theme.inc b/includes/theme.inc
index a93dd0dd7..b54f0bc13 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -2468,7 +2468,7 @@ function template_preprocess_maintenance_page(&$variables) {
global $theme;
// Retrieve the theme data to list all available regions.
- $theme_data = _system_rebuild_theme_data();
+ $theme_data = list_themes();
$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 3574f2d94..794710513 100644
--- a/includes/update.inc
+++ b/includes/update.inc
@@ -36,7 +36,10 @@ function update_check_incompatibility($name, $type = 'module') {
// Store values of expensive functions for future use.
if (empty($themes) || empty($modules)) {
- $themes = _system_rebuild_theme_data();
+ // We need to do a full rebuild here to make sure the database reflects any
+ // code changes that were made in the filesystem before the update script
+ // was initiated.
+ $themes = system_rebuild_theme_data();
$modules = system_rebuild_module_data();
}