diff --git includes/common.inc includes/common.inc
index 5cea431..212d397 100644
--- includes/common.inc
+++ includes/common.inc
@@ -4932,10 +4932,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 includes/install.inc includes/install.inc
index fef9fc5..e05863a 100644
--- includes/install.inc
+++ includes/install.inc
@@ -551,7 +551,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;
@@ -645,7 +645,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 includes/registry.inc includes/registry.inc
index 873c8c3..fbc5338 100644
--- includes/registry.inc
+++ 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 includes/theme.inc includes/theme.inc
index 4437165..caed80c 100644
--- includes/theme.inc
+++ includes/theme.inc
@@ -549,7 +549,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) {
diff --git includes/theme.maintenance.inc includes/theme.maintenance.inc
index 3192b8d..61f69c2 100644
--- includes/theme.maintenance.inc
+++ includes/theme.maintenance.inc
@@ -221,7 +221,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 includes/update.inc includes/update.inc
index 63574c9..a767e73 100644
--- includes/update.inc
+++ includes/update.inc
@@ -151,8 +151,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])) {
diff --git install.php install.php
index 8a3daa9..26c9a90 100644
--- install.php
+++ install.php
@@ -1294,7 +1294,7 @@ function install_bootstrap_full(&$install_state) {
  */
 function install_profile_modules(&$install_state) {
   $modules = variable_get('install_profile_modules', array());
-  $files = system_get_module_data();
+  $files = system_rebuild_module_data();
   variable_del('install_profile_modules');
   $operations = array();
   foreach ($modules as $module) {
diff --git modules/block/block.admin.inc modules/block/block.admin.inc
index 08d3624..081c4f4 100644
--- modules/block/block.admin.inc
+++ modules/block/block.admin.inc
@@ -1,5 +1,5 @@
 <?php
-// $Id: block.admin.inc,v 1.52 2009-08-28 19:44:05 webchick Exp $
+// $Id: block.admin.inc,v 1.51 2009-08-27 19:40:36 dries Exp $
 
 /**
  * @file
@@ -357,11 +357,11 @@ function block_admin_configure(&$form_state, $module = NULL, $delta = 0) {
 
 function block_admin_configure_validate($form, &$form_state) {
   if ($form_state['values']['module'] == 'block') {
-    $custom_block_exists = (bool) db_query_range('SELECT 1 FROM {block_custom} WHERE bid <> :bid AND info = :info', array(
+    $box_exists = (bool) db_query_range('SELECT 1 FROM {box} WHERE bid <> :bid AND info = :info', array(
       ':bid' => $form_state['values']['delta'],
       ':info' => $form_state['values']['info'],
     ), 0, 1)->fetchField();
-    if (empty($form_state['values']['info']) || $custom_block_exists) {
+    if (empty($form_state['values']['info']) || $box_exists) {
       form_set_error('info', t('Please ensure that each block description is unique.'));
     }
   }
@@ -435,9 +435,9 @@ function block_add_block_form(&$form_state) {
 }
 
 function block_add_block_form_validate($form, &$form_state) {
-  $custom_block_exists = (bool) db_query_range('SELECT 1 FROM {block_custom} WHERE info = :info', array(':info' => $form_state['values']['info']), 0, 1)->fetchField();
+  $box_exists = (bool) db_query_range('SELECT 1 FROM {box} WHERE info = :info', array(':info' => $form_state['values']['info']), 0, 1)->fetchField();
 
-  if (empty($form_state['values']['info']) || $custom_block_exists) {
+  if (empty($form_state['values']['info']) || $box_exists) {
     form_set_error('info', t('Please ensure that each block description is unique.'));
   }
 }
@@ -446,7 +446,7 @@ function block_add_block_form_validate($form, &$form_state) {
  * Save the new custom block.
  */
 function block_add_block_form_submit($form, &$form_state) {
-  $delta = db_insert('block_custom')
+  $delta = db_insert('box')
     ->fields(array(
       'body' => $form_state['values']['body'],
       'info' => $form_state['values']['info'],
@@ -513,19 +513,19 @@ function block_add_block_form_submit($form, &$form_state) {
 /**
  * Menu callback; confirm deletion of custom blocks.
  */
-function block_custom_block_delete(&$form_state, $bid = 0) {
-  $custom_block = block_custom_block_get($bid);
-  $form['info'] = array('#type' => 'hidden', '#value' => $custom_block['info'] ? $custom_block['info'] : $custom_block['title']);
+function block_box_delete(&$form_state, $bid = 0) {
+  $box = block_box_get($bid);
+  $form['info'] = array('#type' => 'hidden', '#value' => $box['info'] ? $box['info'] : $box['title']);
   $form['bid'] = array('#type' => 'hidden', '#value' => $bid);
 
-  return confirm_form($form, t('Are you sure you want to delete the block %name?', array('%name' => $custom_block['info'])), 'admin/structure/block', '', t('Delete'), t('Cancel'));
+  return confirm_form($form, t('Are you sure you want to delete the block %name?', array('%name' => $box['info'])), 'admin/structure/block', '', t('Delete'), t('Cancel'));
 }
 
 /**
  * Deletion of custom blocks.
  */
-function block_custom_block_delete_submit($form, &$form_state) {
-  db_delete('block_custom')
+function block_box_delete_submit($form, &$form_state) {
+  db_delete('box')
     ->condition('bid', $form_state['values']['bid'])
     ->execute();
   db_delete('block')
diff --git modules/block/block.info modules/block/block.info
index ea3abf8..497f4da 100644
--- modules/block/block.info
+++ modules/block/block.info
@@ -1,7 +1,7 @@
-; $Id: block.info,v 1.14 2009-08-28 19:44:05 webchick Exp $
+; $Id: block.info,v 1.13 2009-06-08 09:23:50 dries Exp $
 
 name = Block
-description = Controls the visual building blocks a page is constructed with. Blocks are boxes of content rendered into an area, or region, of a web page.
+description = Controls the boxes that are displayed around the main content.
 package = Core
 version = VERSION
 core = 7.x
diff --git modules/block/block.install modules/block/block.install
index f458c08..e493ecc 100644
--- modules/block/block.install
+++ modules/block/block.install
@@ -1,5 +1,5 @@
 <?php
-// $Id: block.install,v 1.31 2009-08-28 19:44:05 webchick Exp $
+// $Id: block.install,v 1.30 2009-08-02 08:16:16 webchick Exp $
 
 /**
  * @file
@@ -159,7 +159,7 @@ function block_schema() {
     ),
   );
 
-  $schema['block_custom'] = array(
+  $schema['box'] = array(
     'description' => 'Stores contents of custom-made blocks.',
     'fields' => array(
       'bid' => array(
diff --git modules/block/block.module modules/block/block.module
index b9a1da6..814646c 100644
--- modules/block/block.module
+++ modules/block/block.module
@@ -1,9 +1,9 @@
 <?php
-// $Id: block.module,v 1.370 2009-08-28 19:44:05 webchick Exp $
+// $Id: block.module,v 1.369 2009-08-27 20:25:28 dries Exp $
 
 /**
  * @file
- * Controls the visual building blocks a page is constructed with.
+ * Controls the boxes that are displayed around the main content.
  */
 
 /**
@@ -150,7 +150,7 @@ function block_menu() {
   $items['admin/structure/block/delete'] = array(
     'title' => 'Delete block',
     'page callback' => 'drupal_get_form',
-    'page arguments' => array('block_custom_block_delete'),
+    'page arguments' => array('block_box_delete'),
     'access arguments' => array('administer blocks'),
     'type' => MENU_CALLBACK,
     'file' => 'block.admin.inc',
@@ -192,7 +192,7 @@ function _block_themes_access($theme) {
 function block_block_list() {
   $blocks = array();
 
-  $result = db_query('SELECT bid, info FROM {block_custom} ORDER BY info');
+  $result = db_query('SELECT bid, info FROM {box} ORDER BY info');
   foreach ($result as $block) {
     $blocks[$block->bid]['info'] = $block->info;
     // Not worth caching.
@@ -205,18 +205,18 @@ function block_block_list() {
  * Implement hook_block_configure().
  */
 function block_block_configure($delta = 0) {
-  $custom_block = array('format' => FILTER_FORMAT_DEFAULT);
+  $box = array('format' => FILTER_FORMAT_DEFAULT);
   if ($delta) {
-    $custom_block = block_custom_block_get($delta);
+    $box = block_box_get($delta);
   }
-  return block_custom_block_form($custom_block);
+  return block_box_form($box);
 }
 
 /**
  * Implement hook_block_save().
  */
 function block_block_save($delta = 0, $edit = array()) {
-  block_custom_block_save($edit, $delta);
+  block_box_save($edit, $delta);
 }
 
 /**
@@ -225,7 +225,7 @@ function block_block_save($delta = 0, $edit = array()) {
  * Generates the administrator-defined blocks for display.
  */
 function block_block_view($delta = 0, $edit = array()) {
-  $block = db_query('SELECT body, format FROM {block_custom} WHERE bid = :bid', array(':bid' => $delta))->fetchObject();
+  $block = db_query('SELECT body, format FROM {box} WHERE bid = :bid', array(':bid' => $delta))->fetchObject();
   $data['content'] = check_markup($block->body, $block->format);
   return $data;
 }
@@ -372,14 +372,14 @@ function _block_rehash() {
   return $blocks;
 }
 
-function block_custom_block_get($bid) {
-  return db_query("SELECT * FROM {block_custom} WHERE bid = :bid", array(':bid' => $bid))->fetchAssoc();
+function block_box_get($bid) {
+  return db_query("SELECT * FROM {box} WHERE bid = :bid", array(':bid' => $bid))->fetchAssoc();
 }
 
 /**
  * Define the custom block form.
  */
-function block_custom_block_form($edit = array()) {
+function block_box_form($edit = array()) {
   $edit += array(
     'info' => '',
     'body' => '',
@@ -409,8 +409,8 @@ function block_custom_block_form($edit = array()) {
   return $form;
 }
 
-function block_custom_block_save($edit, $delta) {
-  db_update('block_custom')
+function block_box_save($edit, $delta) {
+  db_update('box')
     ->fields(array(
       'body' => $edit['body'],
       'info' => $edit['info'],
@@ -868,7 +868,7 @@ function block_user_role_delete($role) {
  * Implement hook_filter_format_delete().
  */
 function block_filter_format_delete($format, $default) {
-  db_update('block_custom')
+  db_update('box')
     ->fields(array('format' => $default->format))
     ->condition('format', $format->format)
     ->execute();
diff --git modules/block/block.test modules/block/block.test
index 460abc0..ce0b273 100644
--- modules/block/block.test
+++ modules/block/block.test
@@ -1,5 +1,5 @@
 <?php
-// $Id: block.test,v 1.27 2009-08-28 19:44:05 webchick Exp $
+// $Id: block.test,v 1.26 2009-08-26 10:53:45 dries Exp $
 
 /**
  * @file
@@ -34,57 +34,57 @@ class BlockTestCase extends DrupalWebTestCase {
   }
 
   /**
-   * Test creating custom block, moving it to a specific region and then deleting it.
+   * Test creating custom block (i.e. box), moving it to a specific region and then deleting it.
    */
-  function testCustomBlock() {
-    // Add a new custom block by filling out the input form on the admin/structure/block/add page.
-    $custom_block = array();
-    $custom_block['info'] = $this->randomName(8);
-    $custom_block['title'] = $this->randomName(8);
-    $custom_block['body'] = $this->randomName(32);
-    $this->drupalPost('admin/structure/block/add', $custom_block, t('Save block'));
+  function testBox() {
+    // Add a new box by filling out the input form on the admin/structure/block/add page.
+    $box = array();
+    $box['info'] = $this->randomName(8);
+    $box['title'] = $this->randomName(8);
+    $box['body'] = $this->randomName(32);
+    $this->drupalPost('admin/structure/block/add', $box, t('Save block'));
 
-    // Confirm that the custom block has been created, and then query the created bid.
-    $this->assertText(t('The block has been created.'), t('Custom block successfully created.'));
-    $bid = db_query("SELECT bid FROM {block_custom} WHERE info = :info", array(':info' => $custom_block['info']))->fetchField();
+    // Confirm that the box has been created, and then query the created bid.
+    $this->assertText(t('The block has been created.'), t('Box successfully created.'));
+    $bid = db_query("SELECT bid FROM {box} WHERE info = :info", array(':info' => $box['info']))->fetchField();
 
-    // Check to see if the custom block was created by checking that it's in the database..
-    $this->assertNotNull($bid, t('Custom block found in database'));
+    // Check to see if the box was created by checking that it's in the database..
+    $this->assertNotNull($bid, t('Box found in database'));
 
     // Check if the block can be moved to all availble regions.
-    $custom_block['module'] = 'block';
-    $custom_block['delta'] = $bid;
+    $box['module'] = 'block';
+    $box['delta'] = $bid;
     foreach ($this->regions as $region) {
-      $this->moveBlockToRegion($custom_block, $region);
+      $this->moveBlockToRegion($box, $region);
     }
 
-    // Delete the created custom block & verify that it's been deleted and no longer appearing on the page.
+    // Delete the created box & verify that it's been deleted and no longer appearing on the page.
     $this->clickLink(t('delete'));
     $this->drupalPost('admin/structure/block/delete/' . $bid, array(), t('Delete'));
-    $this->assertRaw(t('The block %title has been removed.', array('%title' => $custom_block['info'])), t('Custom block successfully deleted.'));
-    $this->assertNoText(t($custom_block['title']), t('Custom block no longer appears on page.'));
+    $this->assertRaw(t('The block %title has been removed.', array('%title' => $box['info'])), t('Box successfully deleted.'));
+    $this->assertNoText(t($box['title']), t('Box no longer appears on page.'));
   }
 
   /**
-   * Test creating custom block using Full HTML.
+   * Test creating custom block (i.e. box) using Full HTML.
    */
-  function testCustomBlockFormat() {
-    // Add a new custom block by filling out the input form on the admin/structure/block/add page.
-    $custom_block = array();
-    $custom_block['info'] = $this->randomName(8);
-    $custom_block['title'] = $this->randomName(8);
-    $custom_block['body'] = '<h1>Full HTML</h1>';
-    $custom_block['body_format'] = 2;
-    $this->drupalPost('admin/structure/block/add', $custom_block, t('Save block'));
-
-    // Set the created custom block to a specific region.
-    $bid = db_query("SELECT bid FROM {block_custom} WHERE info = :info", array(':info' => $custom_block['info']))->fetchField();
+  function testBoxFormat() {
+    // Add a new box by filling out the input form on the admin/structure/block/add page.
+    $box = array();
+    $box['info'] = $this->randomName(8);
+    $box['title'] = $this->randomName(8);
+    $box['body'] = '<h1>Full HTML</h1>';
+    $box['body_format'] = 2;
+    $this->drupalPost('admin/structure/block/add', $box, t('Save block'));
+
+    // Set the created box to a specific region.
+    $bid = db_query("SELECT bid FROM {box} WHERE info = :info", array(':info' => $box['info']))->fetchField();
     $edit = array();
     $edit['block_' . $bid . '[region]'] = $this->regions[1]['name'];
     $this->drupalPost('admin/structure/block', $edit, t('Save blocks'));
 
-    // Confirm that the custom block is being displayed using configured text format.
-    $this->assertRaw('<h1>Full HTML</h1>', t('Custom block successfully being displayed using Full HTML.'));
+    // Confirm that the box is being displayed using configured text format.
+    $this->assertRaw('<h1>Full HTML</h1>', t('Box successfully being displayed using Full HTML.'));
 
     // Confirm that a user without access to Full HTML can not see the body field,
     // but can still submit the form without errors.
@@ -95,8 +95,8 @@ class BlockTestCase extends DrupalWebTestCase {
     $this->drupalPost('admin/structure/block/configure/block/' . $bid, array(), t('Save block'));
     $this->assertNoText(t('Please ensure that each block description is unique.'));
 
-    // Confirm that the custom block is still being displayed using configured text format.
-    $this->assertRaw('<h1>Full HTML</h1>', t('Custom block successfully being displayed using Full HTML.'));
+    // Confirm that the box is still being displayed using configured text format.
+    $this->assertRaw('<h1>Full HTML</h1>', t('Box successfully being displayed using Full HTML.'));
   }
 
   /**
@@ -109,13 +109,13 @@ class BlockTestCase extends DrupalWebTestCase {
     $title = $this->randomName(8);
     
     // Create the custom block
-    $custom_block = array();
-    $custom_block['info'] = $this->randomName(8);
-    $custom_block['title'] = $title;
-    $custom_block['body'] = $this->randomName(32);
-    $this->drupalPost('admin/structure/block/add', $custom_block, t('Save block'));
+    $box = array();
+    $box['info'] = $this->randomName(8);
+    $box['title'] = $title;
+    $box['body'] = $this->randomName(32);
+    $this->drupalPost('admin/structure/block/add', $box, t('Save block'));
     
-    $bid = db_query("SELECT bid FROM {block_custom} WHERE info = :info", array(':info' => $custom_block['info']))->fetchField();
+    $bid = db_query("SELECT bid FROM {box} WHERE info = :info", array(':info' => $box['info']))->fetchField();
     $block['module'] = 'block';
     $block['delta'] = $bid;
     $block['title'] = $title;
@@ -179,7 +179,7 @@ class BlockTestCase extends DrupalWebTestCase {
 
     // Confirm that the regions xpath is not availble
     $xpath = '//div[@id="block-block-' . $bid . '"]/*';
-    $this->assertNoFieldByXPath($xpath, FALSE, t('Custom block found in no regions.'));
+    $this->assertNoFieldByXPath($xpath, FALSE, t('Box found in no regions.'));
 
     // For convenience of developers, put the navigation block back.
     $edit = array();
@@ -208,9 +208,9 @@ class BlockTestCase extends DrupalWebTestCase {
     // Confirm that the block is being displayed.
     $this->assertText(t($block['title']), t('Block successfully being displayed on the page.'));
 
-    // Confirm that the custom block was found at the proper region.
+    // Confirm that the box was found at the proper region.
     $xpath = '//div[@id="' . $region['id'] . '"]//div[@id="block-' . $block['module'] . '-' . $block['delta'] . '"]/*';
-    $this->assertFieldByXPath($xpath, FALSE, t('Custom block found in %region_name region.', array('%region_name' => $region['name'])));
+    $this->assertFieldByXPath($xpath, FALSE, t('Box found in %region_name region.', array('%region_name' => $region['name'])));
   }
 }
 
diff --git modules/filter/filter.test modules/filter/filter.test
index 76ad154..9008ec0 100644
--- modules/filter/filter.test
+++ modules/filter/filter.test
@@ -1,5 +1,5 @@
 <?php
-// $Id: filter.test,v 1.38 2009-08-28 19:44:05 webchick Exp $
+// $Id: filter.test,v 1.37 2009-08-28 16:23:04 dries Exp $
 
 class FilterAdminTestCase extends DrupalWebTestCase {
   public static function getInfo() {
@@ -787,17 +787,17 @@ class FilterHooksTestCase extends DrupalWebTestCase {
     $this->assertText('hook_filter_format_update invoked.', t('hook_filter_format_update() was invoked.'));
 
     // Add a new custom block.
-    $custom_block = array();
-    $custom_block['info'] = $this->randomName(8);
-    $custom_block['title'] = $this->randomName(8);
-    $custom_block['body'] = $this->randomName(32);
+    $box = array();
+    $box['info'] = $this->randomName(8);
+    $box['title'] = $this->randomName(8);
+    $box['body'] = $this->randomName(32);
     // Use the format created.
-    $custom_block['body_format'] = $format;
-    $this->drupalPost('admin/structure/block/add', $custom_block, t('Save block'));
+    $box['body_format'] = $format;
+    $this->drupalPost('admin/structure/block/add', $box, t('Save block'));
     $this->assertText(t('The block has been created.'), t('New block successfully created.'));
 
     // Verify the new block is in the database.
-    $bid = db_query("SELECT bid FROM {block_custom} WHERE info = :info", array(':info' => $custom_block['info']))->fetchField();
+    $bid = db_query("SELECT bid FROM {box} WHERE info = :info", array(':info' => $box['info']))->fetchField();
     $this->assertNotNull($bid, t('New block found in database'));
 
     // Delete the text format.
@@ -806,7 +806,7 @@ class FilterHooksTestCase extends DrupalWebTestCase {
     $this->assertText('hook_filter_format_delete invoked.', t('hook_filter_format_delete() was invoked.'));
 
     // Verify that the deleted format was replaced with the default format.
-    $current_format = db_select('block_custom', 'b')
+    $current_format = db_select('box', 'b')
       ->fields('b', array('format'))
       ->condition('bid', $bid)
       ->execute()
diff --git modules/help/help.admin.inc modules/help/help.admin.inc
index 2438afb..c9b9f2e 100644
--- modules/help/help.admin.inc
+++ modules/help/help.admin.inc
@@ -47,7 +47,7 @@ function help_page($name) {
 
 function help_links_as_list() {
   $empty_arg = drupal_help_arg();
-  $module_info = system_get_module_data();
+  $module_info = system_rebuild_module_data();
 
   $modules = array();
   foreach (module_implements('help', TRUE) as $module) {
diff --git modules/system/system.admin.inc modules/system/system.admin.inc
index 4c75c8e..0ae9ca6 100644
--- modules/system/system.admin.inc
+++ modules/system/system.admin.inc
@@ -146,12 +146,11 @@ function system_admin_menu_block_page() {
  */
 function system_admin_by_module() {
 
-  $modules = system_get_module_data();
+  $module_info = system_get_info('module');
   $menu_items = array();
   $help_arg = module_exists('help') ? drupal_help_arg() : FALSE;
 
-  foreach ($modules as $file) {
-    $module = $file->name;
+  foreach ($module_info as $module => $info) {
     if ($module == 'help') {
       continue;
     }
@@ -169,7 +168,7 @@ function system_admin_by_module() {
       // Sort.
       ksort($admin_tasks);
 
-      $menu_items[$file->info['name']] = array($file->info['description'], $admin_tasks);
+      $menu_items[$info['name']] = array($info['description'], $admin_tasks);
     }
   }
   return theme('system_admin_by_module', $menu_items);
@@ -200,7 +199,7 @@ function system_settings_overview() {
  */
 function system_themes_form() {
 
-  $themes = system_get_theme_data();
+  $themes = system_rebuild_theme_data();
   uasort($themes, 'system_sort_modules_by_info_name');
 
   $status = array();
@@ -388,7 +387,7 @@ function system_theme_settings(&$form_state, $key = '') {
   if ($key) {
     $settings = theme_get_settings($key);
     $var = str_replace('/', '_', 'theme_' . $key . '_settings');
-    $themes = system_get_theme_data();
+    $themes = system_rebuild_theme_data();
     $features = $themes[$key]->info['features'];
   }
   else {
@@ -635,7 +634,7 @@ function _system_is_incompatible(&$incompatible, $files, $file) {
  */
 function system_modules($form_state = array()) {
   // Get current list of modules.
-  $files = system_get_module_data();
+  $files = system_rebuild_module_data();
 
   // Remove hidden modules from display list.
   foreach ($files as $filename => $file) {
@@ -826,7 +825,7 @@ function _system_modules_build_row($info, $extra) {
  * Display confirmation form for required modules.
  *
  * @param $modules
- *   Array of module file objects as returned from system_get_module_data().
+ *   Array of module file objects as returned from system_rebuild_module_data().
  * @param $storage
  *   The contents of $form_state['storage']; an array with two
  *   elements: the list of required modules and the list of status
@@ -884,7 +883,7 @@ function system_modules_submit($form, &$form_state) {
 
   // Get a list of all modules, it will be used to find which module requires
   // which.
-  $files = system_get_module_data();
+  $files = system_rebuild_module_data();
 
   // The modules to be enabled.
   $modules_to_be_enabled = array();
diff --git modules/system/system.api.php modules/system/system.api.php
index c90cdd5..e31fb96 100644
--- modules/system/system.api.php
+++ modules/system/system.api.php
@@ -669,9 +669,10 @@ function hook_mail_alter(&$message) {
 /**
  * Alter the information parsed from module and theme .info files
  *
- * This hook is invoked in _system_get_module_data() and in _system_get_theme_data().
- * A module may implement this hook in order to add to or alter the data
- * generated by reading the .info file with drupal_parse_info_file().
+ * This hook is invoked in _system_rebuild_module_data() and in
+ * _system_rebuild_theme_data(). A module may implement this hook in order to
+ * add to or alter the data generated by reading the .info file with
+ * drupal_parse_info_file().
  *
  * @param &$info
  *   The .info file contents, passed by reference so that it can be altered.
diff --git modules/system/system.install modules/system/system.install
index 5f46172..1676f9d 100644
--- modules/system/system.install
+++ modules/system/system.install
@@ -1,5 +1,5 @@
 <?php
-// $Id: system.install,v 1.382 2009-08-28 19:44:05 webchick Exp $
+// $Id: system.install,v 1.381 2009-08-27 21:18:20 dries Exp $
 
 /**
  * @file
@@ -341,7 +341,7 @@ function system_install() {
   }
 
   // Load system theme data appropriately.
-  system_get_theme_data();
+  system_rebuild_theme_data();
 
   // Inserting uid 0 here confuses MySQL -- the next user might be created as
   // uid 2 which is not what we want. So we insert the first user here, the
@@ -2040,7 +2040,7 @@ function system_update_7021() {
 
   // Migrate contact form information.
   if ($contact_help = variable_get('contact_form_information', '')) {
-    $bid = db_insert('block_custom')->fields(array('body' => $contact_help, 'info' => 'Contact page help', 'format' => FILTER_FORMAT_DEFAULT))->execute();
+    $bid = db_insert('box')->fields(array('body' => $contact_help, 'info' => 'Contact page help', 'format' => FILTER_FORMAT_DEFAULT))->execute();
     foreach ($themes_with_blocks as $theme) {
       // Add contact help block for themes, which had blocks.
       $ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, visibility, pages, cache) VALUES ('block', '" . $bid . "', '" . $theme . "', 1, 5, 'help', 1, 'contact', -1)");
@@ -2050,7 +2050,7 @@ function system_update_7021() {
 
   // Migrate user help setting.
   if ($user_help = variable_get('user_registration_help', '')) {
-    $bid = db_insert('block_custom')->fields(array('body' => $user_help, 'info' => 'User registration guidelines', 'format' => FILTER_FORMAT_DEFAULT))->execute();
+    $bid = db_insert('box')->fields(array('body' => $user_help, 'info' => 'User registration guidelines', 'format' => FILTER_FORMAT_DEFAULT))->execute();
     foreach ($themes_with_blocks as $theme) {
       // Add user registration help block for themes, which had blocks.
       $ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, visibility, pages, cache) VALUES ('block', '" . $bid . "', '" . $theme . "', 1, 5, 'help', 1, 'user/register', -1)");
@@ -2060,7 +2060,7 @@ function system_update_7021() {
 
   // Migrate site mission setting.
   if ($mission = variable_get('site_mission')) {
-    $bid = db_insert('block_custom')->fields(array('body' => $mission, 'info' => 'Site mission', 'format' => FILTER_FORMAT_DEFAULT))->execute();
+    $bid = db_insert('box')->fields(array('body' => $mission, 'info' => 'Site mission', 'format' => FILTER_FORMAT_DEFAULT))->execute();
     foreach ($themes_with_blocks as $theme) {
       // Add mission block for themes, which had blocks.
       $ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, visibility, pages, cache) VALUES ('block', '" . $bid . "', '" . $theme . "', 1, 0, 'highlight', 1, '<front>', -1)");
@@ -2072,7 +2072,7 @@ function system_update_7021() {
 
   // Migrate site footer message to a custom block.
   if ($footer_message = variable_get('site_footer', '')) {
-    $bid = db_insert('block_custom')->fields(array('body' => $footer_message, 'info' => 'Footer message', 'format' => FILTER_FORMAT_DEFAULT))->execute();
+    $bid = db_insert('box')->fields(array('body' => $footer_message, 'info' => 'Footer message', 'format' => FILTER_FORMAT_DEFAULT))->execute();
     foreach ($themes_with_blocks as $theme) {
       // Add site footer block for themes, which had blocks.
       // Set low weight, so the block comes early (it used to be
@@ -2090,7 +2090,7 @@ function system_update_7021() {
   variable_del('site_footer');
 
   // Rebuild theme data, so the new 'help' region is identified.
-  system_get_theme_data();
+  system_rebuild_theme_data();
 
   return $ret;
 }
@@ -2450,15 +2450,6 @@ function system_update_7036() {
 }
 
 /**
- * Rename {box} table to {block_custom}.
- */
-function system_update_7037() {
-  $ret = array();
-  db_rename_table($ret, 'box', 'block_custom');
-  return $ret;
-}
-
-/**
  * @} End of "defgroup updates-6.x-to-7.x"
  * The next series of updates should start at 8000.
  */
diff --git modules/system/system.module modules/system/system.module
index 488d7e9..d612f27 100644
--- modules/system/system.module
+++ modules/system/system.module
@@ -1842,12 +1842,43 @@ function system_update_files_database(&$files, $type) {
 }
 
 /**
+ * Get the .info data about active modules or themes.
+ *
+ * This function returns the .info data in the {system} table. If the $rebuild
+ * parameter is TRUE, the data in the table is rebuilt to be sure it reflects
+ * the current files on disk.
+ *
+ * @param $type
+ *   Either 'module' or 'theme'.
+ * @param $rebuild
+ *   Optional boolean. If TRUE, the data in the database will be rebuilt
+ *   before being fetched.
+ *
+ * @return
+ *   An associative array of module or theme information keyed by name.
+ */
+function system_get_info($type, $rebuild = FALSE) {
+  $info = &drupal_static(__FUNCTION__, array());
+  if ($rebuild) {
+    call_user_func('system_rebuild_' . $type . '_data');
+    unset($info[$type]);
+  }
+  if (!isset($info[$type])) {
+    $result = db_query('SELECT name, info FROM {system} WHERE type = :type AND status = 1', array(':type' => $type));
+    foreach ($result as $item) {
+      $info[$type][$item->name] = unserialize($item->info);
+    }
+  }
+  return $info[$type];
+}
+
+/**
  * Helper function to scan and collect module .info data.
  *
  * @return
  *   An associative array of module information.
  */
-function _system_get_module_data() {
+function _system_rebuild_module_data() {
   // Find modules
   $modules = drupal_system_listing('/\.module$/', 'modules', 'name', 0);
 
@@ -1898,13 +1929,13 @@ function _system_get_module_data() {
 }
 
 /**
- * Collect data about all currently available modules.
+ * Rebuild, save, and return data about all currently available modules.
  *
  * @return
  *   Array of all available modules and their data.
  */
-function system_get_module_data() {
-  $modules = _system_get_module_data();
+function system_rebuild_module_data() {
+  $modules = _system_rebuild_module_data();
   ksort($modules);
   system_get_files_database($modules, 'module');
   system_update_files_database($modules, 'module');
@@ -1934,7 +1965,7 @@ function system_get_module_data() {
  * @return
  *   An associative array of themes information.
  */
-function _system_get_theme_data() {
+function _system_rebuild_theme_data() {
   $themes_info = &drupal_static(__FUNCTION__, array());
 
   if (empty($themes_info)) {
@@ -2060,13 +2091,13 @@ function _system_get_theme_data() {
 }
 
 /**
- * Collect data about all currently available themes.
+ * Rebuild, save, and return data about all currently available themes.
  *
  * @return
  *   Array of all available themes and their data.
  */
-function system_get_theme_data() {
-  $themes = _system_get_theme_data();
+function system_rebuild_theme_data() {
+  $themes = _system_rebuild_theme_data();
   ksort($themes);
   system_get_files_database($themes, 'theme');
   system_update_files_database($themes, 'theme');
diff --git modules/update/update.compare.inc modules/update/update.compare.inc
index bbfa889..0d92a83 100644
--- modules/update/update.compare.inc
+++ modules/update/update.compare.inc
@@ -36,8 +36,8 @@ function update_get_projects() {
     $projects = update_project_cache('update_project_projects');
     if (empty($projects)) {
       // Still empty, so we have to rebuild the cache.
-      $module_data = system_get_module_data();
-      $theme_data = system_get_theme_data();
+      $module_data = system_rebuild_module_data();
+      $theme_data = system_rebuild_theme_data();
       _update_process_info_list($projects, $module_data, 'module', TRUE);
       _update_process_info_list($projects, $theme_data, 'theme', TRUE);
       if (variable_get('update_check_disabled', FALSE)) {
