diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-07-30 03:06:18 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-07-30 03:06:18 +0000 |
commit | 137011df918d911c9811b8d503ca5af037284c4c (patch) | |
tree | d87d47b2a9c5b61e5b9e803baa1bbfc2e2104417 /modules/field/field.attach.inc | |
parent | a63facc8c6b8289f7d456226206c92ee491ecaeb (diff) | |
download | brdo-137011df918d911c9811b8d503ca5af037284c4c.tar.gz brdo-137011df918d911c9811b8d503ca5af037284c4c.tar.bz2 |
- Patch #844388 by lotyrin, bjaspan, effulgentsia: taxonomy terms disappear from node preview if previewed more than once.
Diffstat (limited to 'modules/field/field.attach.inc')
-rw-r--r-- | modules/field/field.attach.inc | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/modules/field/field.attach.inc b/modules/field/field.attach.inc index 3383a5793..faa8743c2 100644 --- a/modules/field/field.attach.inc +++ b/modules/field/field.attach.inc @@ -1035,10 +1035,17 @@ function field_attach_delete_revision($entity_type, $entity) { /** * Prepare field data prior to display. * - * This function must be called before field_attach_view(). It lets field - * types and formatters load additional data needed for display, and - * therefore accepts an array of entities to allow query optimisation when - * displaying lists of entities. + * This function lets field types and formatters load additional data + * needed for display that is not automatically loaded during + * field_attach_load(). It accepts an array of entities to allow query + * optimisation when displaying lists of entities. + * + * field_attach_prepare_view() and field_attach_view() are two halves + * of the same operation. It is safe to call + * field_attach_prepare_view() multiple times on the same entity + * before calling field_attach_view() on it, but calling any Field + * API operation on an entity between passing that entity to these two + * functions may yield incorrect results. * * @param $entity_type * The type of $entities; e.g. 'node' or 'user'. @@ -1076,8 +1083,12 @@ function field_attach_prepare_view($entity_type, $entities, $view_mode) { * Each field is displayed according to the display options specified in the * $instance definition for the given $view_mode. * - * The entity must have run through field_attach_prepare_view() beforehands. - * @see field_attach_prepare_view() + * field_attach_prepare_view() and field_attach_view() are two halves + * of the same operation. It is safe to call + * field_attach_prepare_view() multiple times on the same entity + * before calling field_attach_view() on it, but calling any Field + * API operation on an entity between passing that entity to these two + * functions may yield incorrect results. * * Sample structure: * @code |