summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-03-11 11:37:30 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2012-03-11 11:37:30 -0700
commita697ccdb79f5f543b2125c73336fa85a1f7ee4d5 (patch)
tree22f0e6157d10b58f93b7a4d53c05c2f75c71b1ba
parent4901bf92a13cff9f85a922c208a0390454bd2af4 (diff)
downloadbrdo-a697ccdb79f5f543b2125c73336fa85a1f7ee4d5.tar.gz
brdo-a697ccdb79f5f543b2125c73336fa85a1f7ee4d5.tar.bz2
Issue #1476812 by droplet: Fixed hooks file_field_delete_file() takes only 2 arguments.
-rw-r--r--modules/field/field.api.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/field/field.api.php b/modules/field/field.api.php
index 5a88204af..774d8b55e 100644
--- a/modules/field/field.api.php
+++ b/modules/field/field.api.php
@@ -567,7 +567,7 @@ function hook_field_delete($entity_type, $entity, $field, $instance, $langcode,
// be counted in hook_file_references().
$item['file_field_type'] = $entity_type;
$item['file_field_id'] = $id;
- file_field_delete_file($item, $field);
+ file_field_delete_file($item, $field, $entity_type, $id);
}
}
@@ -592,10 +592,11 @@ function hook_field_delete($entity_type, $entity, $field, $instance, $langcode,
* $entity->{$field['field_name']}[$langcode], or an empty array if unset.
*/
function hook_field_delete_revision($entity_type, $entity, $field, $instance, $langcode, &$items) {
+ list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
foreach ($items as $delta => $item) {
// For hook_file_references, remember that this file is being deleted.
$item['file_field_name'] = $field['field_name'];
- if (file_field_delete_file($item, $field)) {
+ if (file_field_delete_file($item, $field, $entity_type, $id)) {
$items[$delta] = NULL;
}
}