Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.1080
diff -u -p -r1.1080 common.inc
--- includes/common.inc	7 Jan 2010 07:45:03 -0000	1.1080
+++ includes/common.inc	7 Jan 2010 21:23:00 -0000
@@ -6143,7 +6143,7 @@ function drupal_flush_all_caches() {
 
   drupal_theme_rebuild();
   menu_rebuild();
-  node_types_rebuild();
+  module_invoke('node', 'types_rebuild');
   // Don't clear cache_form - in-progress form submissions may break.
   // Ordered so clearing the page cache will always be the last action.
   $core = array('cache', 'cache_filter', 'cache_bootstrap', 'cache_page');
Index: includes/module.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/module.inc,v
retrieving revision 1.178
diff -u -p -r1.178 module.inc
--- includes/module.inc	7 Jan 2010 04:54:18 -0000	1.178
+++ includes/module.inc	7 Jan 2010 22:29:28 -0000
@@ -359,8 +359,8 @@ function module_disable($module_list) {
   foreach ($module_list as $module) {
     if (module_exists($module)) {
       // Check if node_access table needs rebuilding.
-      if (!node_access_needs_rebuild() && module_hook($module, 'node_grants')) {
-        node_access_needs_rebuild(TRUE);
+      if (!module_invoke('node', 'access_needs_rebuild') && module_hook($module, 'node_grants')) {
+        module_invoke('node', 'access_needs_rebuild', TRUE);
       }
 
       module_load_install($module);
@@ -389,8 +389,8 @@ function module_disable($module_list) {
 
   // If there remains no more node_access module, rebuilding will be
   // straightforward, we can do it right now.
-  if (node_access_needs_rebuild() && count(module_implements('node_grants')) == 0) {
-    node_access_rebuild();
+  if (module_invoke('node', 'access_needs_rebuild') && count(module_implements('node_grants')) == 0) {
+    module_invoke('node', 'access_rebuild');
   }
 }
 
Index: modules/block/block.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.admin.inc,v
retrieving revision 1.68
diff -u -p -r1.68 block.admin.inc
--- modules/block/block.admin.inc	3 Jan 2010 21:01:04 -0000	1.68
+++ modules/block/block.admin.inc	7 Jan 2010 22:11:54 -0000
@@ -307,26 +307,6 @@ function block_admin_configure($form, &$
     );
   }
 
-  // Per-content type visibility.
-  $default_type_options = db_query("SELECT type FROM {block_node_type} WHERE module = :module AND delta = :delta", array(
-    ':module' => $block->module,
-    ':delta' => $block->delta,
-  ))->fetchCol();
-  $form['visibility']['node_type'] = array(
-    '#type' => 'fieldset',
-    '#title' => t('Content types'),
-    '#collapsible' => TRUE,
-    '#collapsed' => TRUE,
-    '#group' => 'visibility',
-  );
-  $form['visibility']['node_type']['types'] = array(
-    '#type' => 'checkboxes',
-    '#title' => t('Show block for specific content types'),
-    '#default_value' => $default_type_options,
-    '#options' => node_type_get_names(),
-    '#description' => t('Show this block only on pages that display content of the given type(s). If you select no types, there will be no type specific limitation.'),
-  );
-
   // Per-role visibility.
   $default_role_options = db_query("SELECT rid FROM {block_role} WHERE module = :module AND delta = :delta", array(
     ':module' => $block->module,
@@ -418,20 +398,6 @@ function block_admin_configure_submit($f
     }
     $query->execute();
 
-    db_delete('block_node_type')
-      ->condition('module', $form_state['values']['module'])
-      ->condition('delta', $form_state['values']['delta'])
-      ->execute();
-    $query = db_insert('block_node_type')->fields(array('type', 'module', 'delta'));
-    foreach (array_filter($form_state['values']['types']) as $type) {
-      $query->values(array(
-        'type' => $type,
-        'module' => $form_state['values']['module'],
-        'delta' => $form_state['values']['delta'],
-      ));
-    }
-    $query->execute();
-
     // Store regions per theme for this block
     foreach ($form_state['values']['regions'] as $theme => $region) {
       db_merge('block')
Index: modules/blog/blog.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/blog/blog.info,v
retrieving revision 1.11
diff -u -p -r1.11 blog.info
--- modules/blog/blog.info	8 Jun 2009 09:23:51 -0000	1.11
+++ modules/blog/blog.info	7 Jan 2010 21:57:19 -0000
@@ -5,6 +5,7 @@ description = Enables multi-user blogs.
 package = Core
 version = VERSION
 core = 7.x
+dependencies[] = node
 files[] = blog.module
 files[] = blog.pages.inc
 files[] = blog.test
Index: modules/book/book.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.info,v
retrieving revision 1.13
diff -u -p -r1.13 book.info
--- modules/book/book.info	17 Nov 2009 21:24:18 -0000	1.13
+++ modules/book/book.info	7 Jan 2010 21:57:27 -0000
@@ -4,6 +4,7 @@ description = Allows users to create and
 package = Core
 version = VERSION
 core = 7.x
+dependencies[] = node
 files[] = book.module
 files[] = book.admin.inc
 files[] = book.pages.inc
Index: modules/comment/comment.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.info,v
retrieving revision 1.12
diff -u -p -r1.12 comment.info
--- modules/comment/comment.info	17 Nov 2009 21:24:18 -0000	1.12
+++ modules/comment/comment.info	7 Jan 2010 21:57:41 -0000
@@ -4,6 +4,7 @@ description = Allows users to comment on
 package = Core
 version = VERSION
 core = 7.x
+dependencies[] = node
 files[] = comment.module
 files[] = comment.admin.inc
 files[] = comment.pages.inc
Index: modules/locale/locale.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.install,v
retrieving revision 1.54
diff -u -p -r1.54 locale.install
--- modules/locale/locale.install	10 Dec 2009 15:39:43 -0000	1.54
+++ modules/locale/locale.install	7 Jan 2010 22:31:59 -0000
@@ -122,8 +122,10 @@ function locale_uninstall() {
     variable_del("locale_language_providers_weight_$type");
   }
 
-  foreach (node_type_get_types() as $type => $content_type) {
-    $setting = variable_del("language_content_type_$type");
+  if ($types = module_invoke('node', 'type_get_types')) {
+    foreach ($types as $type => $content_type) {
+      $setting = variable_del("language_content_type_$type");
+    }
   }
 
   // Switch back to English: with a $language->language value different from 'en'
Index: modules/node/node.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.info,v
retrieving revision 1.13
diff -u -p -r1.13 node.info
--- modules/node/node.info	17 Nov 2009 21:24:18 -0000	1.13
+++ modules/node/node.info	7 Jan 2010 21:21:43 -0000
@@ -11,5 +11,4 @@ files[] = node.pages.inc
 files[] = node.install
 files[] = node.test
 files[] = node.tokens.inc
-required = TRUE
 configure = admin/structure/types
Index: modules/node/node.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.install,v
retrieving revision 1.37
diff -u -p -r1.37 node.install
--- modules/node/node.install	4 Dec 2009 16:49:46 -0000	1.37
+++ modules/node/node.install	7 Jan 2010 23:03:14 -0000
@@ -357,6 +357,22 @@ function node_schema() {
 }
 
 /**
+ * Implements hook_install().
+ */
+function node_install() {
+  db_insert('node_access')
+    ->fields(array(
+      'nid' => 0,
+      'gid' => 0,
+      'realm' => 'all',
+      'grant_view' => 1,
+      'grant_update' => 0,
+      'grant_delete' => 0,
+    ))
+    ->execute();
+}
+
+/**
  * @defgroup updates-6.x-to-7.x System updates from 6.x to 7.x
  * @{
  */
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.1198
diff -u -p -r1.1198 node.module
--- modules/node/node.module	6 Jan 2010 14:32:54 -0000	1.1198
+++ modules/node/node.module	7 Jan 2010 23:03:46 -0000
@@ -2061,6 +2061,52 @@ function node_block_view($delta = '') {
 }
 
 /**
+ * Implements hook_form_FORMID_alter().
+ *
+ * Adds node-type specific visibility options to block configuration form.
+ */
+function node_form_block_admin_configure_alter(&$form, &$form_state) {
+  $default_type_options = db_query("SELECT type FROM {block_node_type} WHERE module = :module AND delta = :delta", array(
+    ':module' => $form['module']['#value'],
+    ':delta' => $form['delta']['#value'],
+  ))->fetchCol();
+  $form['visibility']['node_type'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Content types'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+    '#group' => 'visibility',
+  );
+  $form['visibility']['node_type']['types'] = array(
+    '#type' => 'checkboxes',
+    '#title' => t('Show block for specific content types'),
+    '#default_value' => $default_type_options,
+    '#options' => node_type_get_names(),
+    '#description' => t('Show this block only on pages that display content of the given type(s). If you select no types, there will be no type specific limitation.'),
+  );
+  $form['#submit'][] = 'node_block_admin_configure_submit';
+}
+
+/**
+ * Form submit handler for block configuration form.
+ */
+function node_block_admin_configure_submit($form, &$form_state) {
+  db_delete('block_node_type')
+    ->condition('module', $form_state['values']['module'])
+    ->condition('delta', $form_state['values']['delta'])
+    ->execute();
+  $query = db_insert('block_node_type')->fields(array('type', 'module', 'delta'));
+  foreach (array_filter($form_state['values']['types']) as $type) {
+    $query->values(array(
+      'type' => $type,
+      'module' => $form_state['values']['module'],
+      'delta' => $form_state['values']['delta'],
+    ));
+  }
+  $query->execute();
+}
+
+/**
  * A generic function for generating RSS feeds from a set of nodes.
  *
  * @param $nids
Index: modules/poll/poll.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/poll/poll.info,v
retrieving revision 1.10
diff -u -p -r1.10 poll.info
--- modules/poll/poll.info	19 Aug 2009 20:19:36 -0000	1.10
+++ modules/poll/poll.info	7 Jan 2010 22:19:23 -0000
@@ -4,6 +4,7 @@ description = Allows your site to captur
 package = Core
 version = VERSION
 core = 7.x
+dependencies[] = node
 files[] = poll.module
 files[] = poll.pages.inc
 files[] = poll.install
Index: modules/shortcut/shortcut.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/shortcut/shortcut.install,v
retrieving revision 1.3
diff -u -p -r1.3 shortcut.install
--- modules/shortcut/shortcut.install	20 Dec 2009 20:17:11 -0000	1.3
+++ modules/shortcut/shortcut.install	7 Jan 2010 22:39:58 -0000
@@ -19,18 +19,19 @@ function shortcut_enable() {
   // Create an initial default shortcut set.
   $shortcut_set = new StdClass();
   $shortcut_set->title = $t('Default');
-  $shortcut_set->links = array(
-    array(
+  $shortcut_set->links = array();
+  if (module_exists('node')) {
+    $shortcut_set->links[] = array(
       'link_path' => 'node/add',
       'link_title' => $t('Add content'),
       'weight' => -20,
-    ),
-    array(
+    );
+    $shortcut_set->links[] = array(
       'link_path' => 'admin/content',
       'link_title' => $t('Find content'),
       'weight' => -19,
-    ),
-  );
+    );
+  }
   shortcut_set_save($shortcut_set);
 }
 
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.246
diff -u -p -r1.246 system.admin.inc
--- modules/system/system.admin.inc	4 Jan 2010 21:31:52 -0000	1.246
+++ modules/system/system.admin.inc	7 Jan 2010 21:26:26 -0000
@@ -1240,7 +1240,7 @@ function system_modules_submit($form, &$
   // Clear all caches.
   registry_rebuild();
   drupal_theme_rebuild();
-  node_types_rebuild();
+  module_invoke('node', 'types_rebuild');
   menu_rebuild();
   cache_clear_all('schema', 'cache');
   entity_info_cache_clear();
@@ -1256,8 +1256,6 @@ function system_modules_submit($form, &$
 
   // Synchronize to catch any actions that were added or removed.
   actions_synchronize();
-
-  return;
 }
 
 /**
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.434
diff -u -p -r1.434 system.install
--- modules/system/system.install	5 Jan 2010 18:00:14 -0000	1.434
+++ modules/system/system.install	7 Jan 2010 22:37:39 -0000
@@ -336,7 +336,7 @@ function system_requirements($phase) {
  */
 function system_install() {
   // Create tables.
-  $modules = array('system', 'filter', 'user', 'node');
+  $modules = array('system', 'filter', 'user');
   foreach ($modules as $module) {
     drupal_install_schema($module);
     $versions = drupal_get_schema_versions($module);
@@ -406,17 +406,6 @@ function system_install() {
     ->condition('name', 'garland')
     ->execute();
 
-  db_insert('node_access')
-    ->fields(array(
-      'nid' => 0,
-      'gid' => 0,
-      'realm' => 'all',
-      'grant_view' => 1,
-      'grant_update' => 0,
-      'grant_delete' => 0,
-    ))
-    ->execute();
-
   $cron_key = md5(mt_rand());
 
   variable_set('cron_key', $cron_key);
Index: modules/translation/translation.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/translation/translation.info,v
retrieving revision 1.5
diff -u -p -r1.5 translation.info
--- modules/translation/translation.info	8 Jun 2009 09:23:54 -0000	1.5
+++ modules/translation/translation.info	7 Jan 2010 21:58:19 -0000
@@ -1,10 +1,11 @@
 ; $Id: translation.info,v 1.5 2009/06/08 09:23:54 dries Exp $
 name = Content translation
 description = Allows content to be translated into different languages.
-dependencies[] = locale
 package = Core
 version = VERSION
 core = 7.x
+dependencies[] = node
+dependencies[] = locale
 files[] = translation.module
 files[] = translation.pages.inc
 files[] = translation.test
Index: profiles/standard/standard.info
===================================================================
RCS file: /cvs/drupal/drupal/profiles/standard/standard.info,v
retrieving revision 1.1
diff -u -p -r1.1 standard.info
--- profiles/standard/standard.info	4 Jan 2010 23:08:34 -0000	1.1
+++ profiles/standard/standard.info	7 Jan 2010 21:20:49 -0000
@@ -3,6 +3,7 @@ name = Standard
 description = Install with commonly used features pre-configured.
 version = VERSION
 core = 7.x
+dependencies[] = node
 dependencies[] = block
 dependencies[] = color
 dependencies[] = comment
