From 2cd91be6330e1678e2d4c61b64da25db28559b8d Mon Sep 17 00:00:00 2001 From: webchick Date: Sat, 7 Jul 2012 13:07:22 -0700 Subject: Issue #985642 by Berdir, Damien Tournoud, kiamlaluno, yched: Remove file_attach_load() from file_field_update(). --- modules/file/file.field.inc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'modules/file') diff --git a/modules/file/file.field.inc b/modules/file/file.field.inc index 7a5697ccb..6a9f199c4 100644 --- a/modules/file/file.field.inc +++ b/modules/file/file.field.inc @@ -261,11 +261,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) { -- cgit v1.2.3