diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2012-07-07 13:07:22 -0700 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2012-07-07 13:07:22 -0700 |
commit | 2cd91be6330e1678e2d4c61b64da25db28559b8d (patch) | |
tree | 68228ec5ebb0bcd7606a7c3424fbba6b98897817 /modules/file | |
parent | b67f7affd13d264e8e25488971532fe13545d72d (diff) | |
download | brdo-2cd91be6330e1678e2d4c61b64da25db28559b8d.tar.gz brdo-2cd91be6330e1678e2d4c61b64da25db28559b8d.tar.bz2 |
Issue #985642 by Berdir, Damien Tournoud, kiamlaluno, yched: Remove file_attach_load() from file_field_update().
Diffstat (limited to 'modules/file')
-rw-r--r-- | modules/file/file.field.inc | 5 |
1 files changed, 1 insertions, 4 deletions
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) { |