Skip to content
Snippets Groups Projects
Commit 5661a871 authored by Alex Barth's avatar Alex Barth
Browse files

Fix entity inspection in file fetcher.

parent c0e93fb8
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
Feeds 7.x 2.0 XXXXXXXXXXXXXXXXXXX Feeds 7.x 2.0 XXXXXXXXXXXXXXXXXXX
--------------------------------- ---------------------------------
- Fix entity inspection in file fetcher.
- #932772 alex_b: FeedsProcessor: Consolidate process() and clear(). - #932772 alex_b: FeedsProcessor: Consolidate process() and clear().
FeedsProcessor now implements the process() and clear() methods for creating FeedsProcessor now implements the process() and clear() methods for creating
and deleting entities. The extending processors FeedsNodeProcessor, and deleting entities. The extending processors FeedsNodeProcessor,
......
...@@ -63,9 +63,9 @@ function file_feeds_set_target($entity, $target, $value) { ...@@ -63,9 +63,9 @@ function file_feeds_set_target($entity, $target, $value) {
// Determine file destination. // Determine file destination.
// @todo This needs review and debugging. // @todo This needs review and debugging.
list($entity_id, $vid, $bundle_name) = entity_extract_ids($entity->feeds_item->entity_type, $entity);
$instance_info = field_info_instance($entity->feeds_item->entity_type, $target, $bundle_name);
$info = field_info_field($target); $info = field_info_field($target);
$bundle_name = $entity->entity_type == 'node' ? $entity->type : $entity->entity_type;
$instance_info = field_info_instance($entity->entity_type, $target, $bundle_name);
$account = !empty($entity->uid) ? user_load($entity->uid) : NULL; $account = !empty($entity->uid) ? user_load($entity->uid) : NULL;
$destination = file_field_widget_uri($info, $instance_info, $account); $destination = file_field_widget_uri($info, $instance_info, $account);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment