Index: profiles/default/default.profile
===================================================================
RCS file: /cvs/drupal/drupal/profiles/default/default.profile,v
retrieving revision 1.23
diff -u -p -r1.23 default.profile
--- profiles/default/default.profile 10 Mar 2008 18:15:14 -0000 1.23
+++ profiles/default/default.profile 17 May 2008 20:51:37 -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 an article, 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' => 'article',
'name' => st('Article'),
- 'module' => 'node',
+ 'module' => 'node_content',
'description' => st("An article, 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 an article entry. By default, an article entry is automatically featured on the site's initial home page, and provides the ability to post comments."),
'custom' => TRUE,
'modified' => TRUE,
Index: modules/book/book.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/book/book.install,v
retrieving revision 1.22
diff -u -p -r1.22 book.install
--- modules/book/book.install 15 May 2008 21:19:24 -0000 1.22
+++ modules/book/book.install 17 May 2008 20:51:38 -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.53
diff -u -p -r1.53 content_types.inc
--- modules/node/content_types.inc 13 May 2008 17:37:58 -0000 1.53
+++ modules/node/content_types.inc 17 May 2008 20:51:38 -0000
@@ -271,7 +271,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.6
diff -u -p -r1.6 node.install
--- modules/node/node.install 15 Apr 2008 08:39:03 -0000 1.6
+++ modules/node/node.install 17 May 2008 20:51:38 -0000
@@ -380,3 +380,22 @@ function node_schema() {
return $schema;
}
+
+/**
+ * Drupal 6.x to 7.x updates
+ */
+
+/**
+ * Fix node type 'module' attribute to avoid name-space conflicts.
+ */
+function node_update_7000() {
+ $ret = array();
+
+ $ret[] = update_sql("UPDATE {node_type} SET module = 'node_content' WHERE module = 'node'");
+
+ return $ret;
+}
+
+/**
+ * End of 6.x to 7.x updates
+ */
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.966
diff -u -p -r1.966 node.module
--- modules/node/node.module 15 May 2008 21:40:31 -0000 1.966
+++ modules/node/node.module 17 May 2008 20:51:38 -0000
@@ -553,8 +553,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) {
@@ -625,10 +625,6 @@ function _node_type_set_defaults($info)
*/
function node_hook(&$node, $hook) {
$module = node_get_types('module', $node);
- if ($module == 'node') {
- // Avoid function name collisions.
- $module = 'node_content';
- }
return module_hook($module, $hook);
}
@@ -647,9 +643,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));
}
@@ -1133,7 +1126,7 @@ function node_perm() {
);
foreach (node_get_types() as $type) {
- if ($type->module == 'node') {
+ if ($type->module == 'node_content') {
$perms += node_list_permissions($type);
}
}
@@ -2049,9 +2042,6 @@ function node_access($op, $node, $accoun
// Can't use node_invoke('access', $node), 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;