From f0b3fa4b1bb0b8c91424c3ad36dfef592ccbc954 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 8 Aug 2010 13:02:37 +0000 Subject: - Patch #504564 by tic2000, andypost, catch: the 'Length of trimmed content' form input in the 'node type' edit form was way too harsh (affects the display of all 'trimmed / summary_or_trimmed' formatters on all text fields in all view modes), and irrelevant for text fields on non-node entities, which are currently all blocked to 'trim to 600 chars'. * Added field formatter settings for 'text_trimmed' and 'text_summary_or_trimmed' formatters * Removed 'teaser_length' settings for node types * Added upgrade path for 'teaser_length' variable in node_update_7011() * Fixed a test --- modules/node/node.module | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/node/node.module') diff --git a/modules/node/node.module b/modules/node/node.module index b0c3bb744..f32625b8e 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -555,6 +555,9 @@ function node_type_save($info) { * A node type object. * @param $label * The label for the body instance. + * + * @return + * Body field instance. */ function node_add_body_field($type, $label = 'Body') { // Add or remove the body field, as needed. @@ -588,8 +591,9 @@ function node_add_body_field($type, $label = 'Body') { ), ), ); - field_create_instance($instance); + $instance = field_create_instance($instance); } + return $instance; } /** -- cgit v1.2.3