From 45152d374e6660f04b1268db2618c7221604a5c6 Mon Sep 17 00:00:00 2001
From: git <git@102134.no-reply.drupal.org>
Date: Fri, 16 Jan 2015 12:05:49 -0800
Subject: [PATCH] Issue #2011240 by ressa, Abelito: How to import the
 description of a file?

---
 mappers/file.inc           | 9 +++++++++
 plugins/FeedsProcessor.inc | 0
 2 files changed, 9 insertions(+)
 mode change 100755 => 100644 plugins/FeedsProcessor.inc

diff --git a/mappers/file.inc b/mappers/file.inc
index e9cbc26e..22735908 100644
--- a/mappers/file.inc
+++ b/mappers/file.inc
@@ -37,6 +37,14 @@ function file_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_nam
           'real_target' => $name,
         );
       }
+      elseif ($info['type'] === 'file') {
+        $targets[$name . ':description'] = array(
+          'name' => t('@label: Description', array('@label' => $instance['label'])),
+          'callback' => 'file_feeds_set_target',
+          'description' => t('The description of the @label field.', array('@label' => $instance['label'])),
+          'real_target' => $name,
+        );
+      }
     }
   }
 }
@@ -98,6 +106,7 @@ function file_feeds_set_target($source, $entity, $target, array $values) {
     switch ($sub_field) {
       case 'alt':
       case 'title':
+      case 'description':
         $field[LANGUAGE_NONE][$delta][$sub_field] = $v;
         break;
 
diff --git a/plugins/FeedsProcessor.inc b/plugins/FeedsProcessor.inc
old mode 100755
new mode 100644
-- 
GitLab