From f0940b1dbf630c438bf99fb21dd62518cebfd81a Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 25 May 2009 15:39:12 +0000 Subject: - Patch #223771 by Arancaytar, Amitaibu: node_body_field does not check ->has_body. --- modules/node/node.pages.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/node/node.pages.inc') diff --git a/modules/node/node.pages.inc b/modules/node/node.pages.inc index 1271efd42..4b9755a0e 100644 --- a/modules/node/node.pages.inc +++ b/modules/node/node.pages.inc @@ -289,6 +289,10 @@ function node_form(&$form_state, $node) { * Return a node body field, with format and teaser. */ function node_body_field($node, $label, $word_count) { + // Do not generate a body field if the type does not specify one. + if (!node_get_types('type', $node)->has_body) { + return array(); + } // Check if we need to restore the teaser at the beginning of the body. $include = !isset($node->teaser) || ($node->teaser == substr($node->body, 0, strlen($node->teaser))); -- cgit v1.2.3