From b3265dbe174ce0efefa181b8af6c1eaea3ff22c2 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sun, 11 Oct 2009 03:07:21 +0000 Subject: #557292 by peximo, plach, catch, and yched: Convert node title to Field API. --- modules/node/node.install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/node/node.install') diff --git a/modules/node/node.install b/modules/node/node.install index 947757605..7a4e156eb 100644 --- a/modules/node/node.install +++ b/modules/node/node.install @@ -438,9 +438,9 @@ function node_update_7006(&$context) { if (!isset($context['total'])) { // Initial invocation. - // Re-save node types to create body field instances. + // Re-save node types to create title and body field instances. foreach ($node_types as $type => $info) { - if ($info->has_body) { + if ($info->has_title || $info->has_body) { node_type_save($info); } } @@ -485,6 +485,7 @@ function node_update_7006(&$context) { 'vid' => $revision->vid, 'type' => $revision->type, ); + $node->title[FIELD_LANGUAGE_NONE][0]['value'] = $revision->title; if (!empty($revision->teaser) && $revision->teaser != text_summary($revision->body)) { $node->body[FIELD_LANGUAGE_NONE][0]['summary'] = $revision->teaser; } -- cgit v1.2.3