summaryrefslogtreecommitdiff
path: root/modules/field/field.autoload.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-05-01 15:28:13 +0000
committerDries Buytaert <dries@buytaert.net>2009-05-01 15:28:13 +0000
commit9fd65b6617f89e918392c9ea8c4ebc93fb4687e6 (patch)
tree7fb381513cb7f5b070e58938a11a3b69a3ef5a05 /modules/field/field.autoload.inc
parent81c436fb8ede77a655a79bca6d613e205b913e86 (diff)
downloadbrdo-9fd65b6617f89e918392c9ea8c4ebc93fb4687e6.tar.gz
brdo-9fd65b6617f89e918392c9ea8c4ebc93fb4687e6.tar.bz2
- Patch #392696 by yched et al: save default values on insert.
Diffstat (limited to 'modules/field/field.autoload.inc')
-rw-r--r--modules/field/field.autoload.inc11
1 files changed, 9 insertions, 2 deletions
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.
*/