? .DS_Store
? 361648
? cache-schema-tables-individually.patch
? cache-schema-without-cache.patch
? drupal_vertical_tabs_1.patch
? head.db
? translations-node-access.patch
? translations-node-access_3.patch
? modules/.DS_Store
? sites/all/modules/.DS_Store
? sites/all/modules/feature
? sites/all/modules/feature.zip
? sites/default/.DS_Store
? sites/default/files
? sites/default/settings.php
Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.271
diff -u -p -r1.271 bootstrap.inc
--- includes/bootstrap.inc	1 Mar 2009 09:32:17 -0000	1.271
+++ includes/bootstrap.inc	15 Mar 2009 22:50:55 -0000
@@ -1376,71 +1376,51 @@ function ip_address($reset = FALSE) {
  */
 
 /**
- * Get the schema definition of a table, or the whole database schema.
+ * Get the schema definition of a table.
  *
  * The returned schema will include any modifications made by any
  * module that implements hook_schema_alter().
  *
  * @param $table
- *   The name of the table. If not given, the schema of all tables is returned.
+ *   The name of the table.
  * @param $rebuild
  *   If true, the schema will be rebuilt instead of retrieved from the cache.
  */
-function drupal_get_schema($table = NULL, $rebuild = FALSE) {
+function drupal_get_schema($table, $rebuild = FALSE) {
   static $schema = array();
 
-  if (empty($schema) || $rebuild) {
-    // Try to load the schema from cache.
-    if (!$rebuild && $cached = cache_get('schema')) {
-      $schema = $cached->data;
+  if (empty($schema[$table]) || $rebuild) {
+    $schema = array();
+    // Load the .install files to get hook_schema.
+    // 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 (drupal_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
+      // is called very early in the bootstrap process then it will be
+      // 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.
+      module_list(TRUE);
+      module_load_all_includes('install');
     }
-    // Otherwise, rebuild the schema cache.
-    else {
-      $schema = array();
-      // Load the .install files to get hook_schema.
-      // 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 (drupal_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
-        // is called very early in the bootstrap process then it will be
-        // 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.
-        module_list(TRUE);
-        module_load_all_includes('install');
+    
+    require_once DRUPAL_ROOT . '/includes/common.inc';
+    // Invoke hook_schema for all modules.
+    foreach (module_implements('schema') as $module) {
+      $current = module_invoke($module, 'schema');
+      if (drupal_function_exists('_drupal_initialize_schema')) {
+        _drupal_initialize_schema($module, $current);
       }
 
-      require_once DRUPAL_ROOT . '/includes/common.inc';
-      // Invoke hook_schema for all modules.
-      foreach (module_implements('schema') as $module) {
-        $current = module_invoke($module, 'schema');
-        if (drupal_function_exists('_drupal_initialize_schema')) {
-          _drupal_initialize_schema($module, $current);
-        }
-
-        $schema = array_merge($schema, $current);
-      }
-
-      if (drupal_function_exists('drupal_alter')) {
-        drupal_alter('schema', $schema);
-      }
-
-      // If the schema is empty, avoid saving it: some database engines require
-      // the schema to perform queries, and this could lead to infinite loops.
-      if (!empty($schema) && (drupal_get_bootstrap_phase() == DRUPAL_BOOTSTRAP_FULL)) {
-        cache_set('schema', $schema);
-      }
+      $schema = array_merge($schema, $current);
     }
   }
 
-  if (!isset($table)) {
-    return $schema;
-  }
-  elseif (isset($schema[$table])) {
+  if (isset($table) && isset($schema[$table])) {
     return $schema[$table];
   }
   else {
