Index: modules/book/book.install =================================================================== RCS file: /cvs/drupal/drupal/modules/book/book.install,v retrieving revision 1.18 diff -u -p -r1.18 book.install --- modules/book/book.install 19 Dec 2007 10:34:50 -0000 1.18 +++ modules/book/book.install 5 Jan 2008 01:06:36 -0000 @@ -27,7 +27,7 @@ function _book_install_type_create() { $book_node_type = array( 'type' => 'book', 'name' => t('Book page'), - 'module' => 'node', + 'module' => 'node_content', 'description' => t('A book page is a page of content, organized into a collection of related entries collectively known as a book. A book page automatically displays links to adjacent pages, providing a simple navigation system for organizing and reviewing structured content.'), 'custom' => TRUE, 'modified' => TRUE, Index: modules/node/content_types.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v retrieving revision 1.49 diff -u -p -r1.49 content_types.inc --- modules/node/content_types.inc 22 Dec 2007 23:24:25 -0000 1.49 +++ modules/node/content_types.inc 5 Jan 2008 01:06:36 -0000 @@ -270,7 +270,7 @@ function node_type_form_submit($form, &$ $type->has_title = ($type->title_label != ''); $type->has_body = ($type->body_label != ''); - $type->module = !empty($form_state['values']['module']) ? $form_state['values']['module'] : 'node'; + $type->module = !empty($form_state['values']['module']) ? $form_state['values']['module'] : 'node_content'; $type->custom = $form_state['values']['custom']; $type->modified = TRUE; $type->locked = $form_state['values']['locked']; Index: modules/node/node.install =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.install,v retrieving revision 1.4 diff -u -p -r1.4 node.install --- modules/node/node.install 18 Dec 2007 12:59:21 -0000 1.4 +++ modules/node/node.install 5 Jan 2008 01:06:36 -0000 @@ -333,3 +333,21 @@ function node_schema() { return $schema; } +/** + * Drupal 5.x to 6.x updates + */ + +/** + * Fix node type 'module' attribute to avoid name-space conflicts. + */ +function node_update_6000() { + $ret = array(); + + $ret[] = update_sql("UPDATE {node_type} SET module = 'node_content' WHERE module = 'node'"); + + return $ret; +} + +/** + * End of 5.x to 6.x updates + */ Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.936 diff -u -p -r1.936 node.module --- modules/node/node.module 4 Jan 2008 13:50:50 -0000 1.936 +++ modules/node/node.module 5 Jan 2008 01:06:36 -0000 @@ -505,8 +505,8 @@ function _node_types_build() { while ($type_object = db_fetch_object($type_result)) { // Check for node types from disabled modules and mark their types for removal. // Types defined by the node module in the database (rather than by a separate - // module using hook_node_info) have a module value of 'node'. - if ($type_object->module != 'node' && empty($info_array[$type_object->type])) { + // module using hook_node_info) have a module value of 'node_content'. + if ($type_object->module != 'node_content' && empty($info_array[$type_object->type])) { $type_object->disabled = TRUE; } if (!isset($_node_types[$type_object->type]) || $type_object->modified) { @@ -577,9 +577,6 @@ function _node_type_set_defaults($info) */ function node_hook(&$node, $hook) { $module = node_get_types('module', $node); - if ($module == 'node') { - $module = 'node_content'; // Avoid function name collisions. - } return module_hook($module, $hook); } @@ -598,9 +595,6 @@ function node_hook(&$node, $hook) { function node_invoke(&$node, $hook, $a2 = NULL, $a3 = NULL, $a4 = NULL) { if (node_hook($node, $hook)) { $module = node_get_types('module', $node); - if ($module == 'node') { - $module = 'node_content'; // Avoid function name collisions. - } $function = $module .'_'. $hook; return ($function($node, $a2, $a3, $a4)); } @@ -1075,7 +1069,7 @@ function node_perm() { $perms = array('administer content types', 'administer nodes', 'access content', 'view revisions', 'revert revisions', 'delete revisions'); foreach (node_get_types() as $type) { - if ($type->module == 'node') { + if ($type->module == 'node_content') { $name = check_plain($type->type); $perms[] = 'create '. $name .' content'; $perms[] = 'delete own '. $name .' content'; @@ -1935,9 +1929,6 @@ function node_access($op, $node, $accoun // Can't use node_invoke(), because the access hook takes the $op parameter // before the $node parameter. $module = node_get_types('module', $node); - if ($module == 'node') { - $module = 'node_content'; // Avoid function name collisions. - } $access = module_invoke($module, 'access', $op, $node, $account); if (!is_null($access)) { return $access; Index: profiles/default/default.profile =================================================================== RCS file: /cvs/drupal/drupal/profiles/default/default.profile,v retrieving revision 1.22 diff -u -p -r1.22 default.profile --- profiles/default/default.profile 17 Dec 2007 12:43:34 -0000 1.22 +++ profiles/default/default.profile 5 Jan 2008 01:06:36 -0000 @@ -98,7 +98,7 @@ function default_profile_tasks(&$task, $ array( 'type' => 'page', 'name' => st('Page'), - 'module' => 'node', + 'module' => 'node_content', 'description' => st("A page, similar in form to a story, is a simple method for creating and displaying information that rarely changes, such as an \"About us\" section of a website. By default, a page entry does not allow visitor comments and is not featured on the site's initial home page."), 'custom' => TRUE, 'modified' => TRUE, @@ -109,7 +109,7 @@ function default_profile_tasks(&$task, $ array( 'type' => 'story', 'name' => st('Story'), - 'module' => 'node', + 'module' => 'node_content', 'description' => st("A story, similar in form to a page, is ideal for creating and displaying content that informs or engages website visitors. Press releases, site announcements, and informal blog-like entries may all be created with a story entry. By default, a story entry is automatically featured on the site's initial home page, and provides the ability to post comments."), 'custom' => TRUE, 'modified' => TRUE,