From 9fd65b6617f89e918392c9ea8c4ebc93fb4687e6 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 1 May 2009 15:28:13 +0000 Subject: - Patch #392696 by yched et al: save default values on insert. --- modules/field/field.autoload.inc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'modules/field/field.autoload.inc') diff --git a/modules/field/field.autoload.inc b/modules/field/field.autoload.inc index 9d848f65e..9ebe204f2 100644 --- a/modules/field/field.autoload.inc +++ b/modules/field/field.autoload.inc @@ -185,13 +185,20 @@ function field_attach_presave($obj_type, &$object) { } /** - * Save field data for a new object. The passed in object must - * already contain its id and (if applicable) revision id attributes. + * Save field data for a new object. + * + * The passed in object must already contain its id and (if applicable) + * revision id attributes. + * Default values (if any) will be inserted for fields not present in the + * $object. * * @param $obj_type * The type of $object; e.g. 'node' or 'user'. * @param $object * The object with fields to save. + * @return + * Default values (if any) will be added to the $object parameter for fields + * it leaves unspecified. * * This function is an autoloader for _field_attach_insert() in modules/field/field.attach.inc. */ -- cgit v1.2.3