summaryrefslogtreecommitdiff
path: root/includes/bootstrap.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r--includes/bootstrap.inc7
1 files changed, 4 insertions, 3 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index c4d52e27c..53897c683 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -2593,7 +2593,6 @@ function drupal_get_schema($table = NULL, $rebuild = FALSE) {
// On some databases this function may be called before bootstrap has
// been completed, so we force the functions we need to load just in case.
if (function_exists('module_load_all_includes')) {
-
// There is currently a bug in module_list() where it caches what it
// was last called with, which is not always what you want.
// module_load_all_includes() calls module_list(), but if this function
@@ -2601,7 +2600,7 @@ function drupal_get_schema($table = NULL, $rebuild = FALSE) {
// uninitialized and therefore return no modules. Instead, we have to
// "prime" module_list() here to to values we want, specifically
// "yes rebuild the list and don't limit to bootstrap".
- // TODO: Remove this call after http://drupal.org/node/222109 is fixed.
+ // @todo Remove this call after http://drupal.org/node/222109 is fixed.
module_list(TRUE, FALSE);
module_load_all_includes('install');
}
@@ -2613,7 +2612,9 @@ function drupal_get_schema($table = NULL, $rebuild = FALSE) {
// would cause array_merge() to set the $schema variable to NULL as well.
// That would break modules which use $schema further down the line.
$current = (array) module_invoke($module, 'schema');
- _drupal_schema_initialize($module, $current);
+ // Set 'module' and 'name' keys for each table, and remove descriptions,
+ // as they needlessly slow down cache_get() for every single request.
+ _drupal_schema_initialize($current, $module);
$schema = array_merge($schema, $current);
}