Commit 1f7aa072 authored by Dries's avatar Dries
Browse files

- Patch #627626 by Damien Tournoud: fixed Node-specific code in file field.

parent bf5a223d
......@@ -243,21 +243,14 @@ function file_field_prepare_view($obj_type, $objects, $field, $instances, $langc
}
}
/**
* Implements hook_field_insert().
*/
function file_field_insert($obj_type, $object, $field, $instance, $langcode, &$items) {
file_field_update($obj_type, $object, $field, $instance, $langcode, $items);
}
/**
* Implements hook_field_update().
*
* Check for files that have been removed from the object.
*/
function file_field_update($obj_type, $object, $field, $instance, $langcode, &$items) {
// Check for files that have been removed from the object.
// On new revisions, old files are always maintained in the previous revision.
if ($object->is_new || (isset($object->revision) && $object->revision)) {
if (!empty($object->revision)) {
return;
}
......
Markdown is supported
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