diff options
Diffstat (limited to 'modules/field/field.attach.inc')
-rw-r--r-- | modules/field/field.attach.inc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/modules/field/field.attach.inc b/modules/field/field.attach.inc index 2419201de..bd2934b48 100644 --- a/modules/field/field.attach.inc +++ b/modules/field/field.attach.inc @@ -44,6 +44,9 @@ class FieldValidationException extends FieldException { * * Each field defines which storage backend it uses. The Drupal system variable * 'field_storage_default' identifies the storage backend used by default. + * + * See @link field Field API @endlink for information about the other parts of + * the Field API. */ /** @@ -117,6 +120,12 @@ define('FIELD_STORAGE_INSERT', 'insert'); * The pre-operation hooks do not make the Field Storage API irrelevant. The * Field Storage API is essentially the "fallback mechanism" for any fields * that aren't being intercepted explicitly by pre-operation hooks. + * + * @link field_language Field Language API @endlink provides information about + * the structure of field objects. + * + * See @link field Field API @endlink for information about the other parts of + * the Field API. */ /** @@ -185,8 +194,10 @@ function _field_invoke($op, $entity_type, $entity, &$a = NULL, &$b = NULL, $opti // Iterate through the instances and collect results. $return = array(); foreach ($instances as $instance) { - $field_name = $instance['field_name']; - $field = field_info_field($field_name); + // field_info_field() is not available for deleted fields, so use + // field_info_field_by_id(). + $field = field_info_field_by_id($instance['field_id']); + $field_name = $field['field_name']; $function = $options['default'] ? 'field_default_' . $op : $field['module'] . '_field_' . $op; if (function_exists($function)) { // Determine the list of languages to iterate on. @@ -694,7 +705,8 @@ function field_attach_load($entity_type, $entities, $age = FIELD_LOAD_CURRENT, $ } // Invoke field-type module's hook_field_load(). - _field_invoke_multiple('load', $entity_type, $queried_entities, $age, $options); + $null = NULL; + _field_invoke_multiple('load', $entity_type, $queried_entities, $age, $null, $options); // Invoke hook_field_attach_load(): let other modules act on loading the // entitiy. |