Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
4f62dcc3
Commit
4f62dcc3
authored
Jun 17, 2012
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#985642
by Berdir, yched: remove file_attach_load() from file_field_update().
parent
0ac10a7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
core/modules/file/file.field.inc
core/modules/file/file.field.inc
+1
-4
No files found.
core/modules/file/file.field.inc
View file @
4f62dcc3
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment