Commit 4f62dcc3 authored by Dries's avatar Dries
Browse files

- Patch #985642 by Berdir, yched: remove file_attach_load() from file_field_update().

parent 0ac10a7b
......@@ -259,11 +259,8 @@ function file_field_update($entity_type, $entity, $field, $instance, $langcode,
$current_fids[] = $item['fid'];
// Create a bare-bones entity so that we can load its previous values.
$original = entity_create_stub_entity($entity_type, array($id, $vid, $bundle));
field_attach_load($entity_type, array($id => $original), FIELD_LOAD_CURRENT, array('field_id' => $field['id']));
// Compare the original field values with the ones that are being saved.
$original = $entity->original;
$original_fids = array();
if (!empty($original->{$field['field_name']}[$langcode])) {
foreach ($original->{$field['field_name']}[$langcode] as $original_item) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment