Révision a192dc0b
Ajouté par Assos Assos il y a environ 8 ans
drupal7/sites/all/modules/feeds/mappers/link.inc | ||
---|---|---|
39 | 39 |
/** |
40 | 40 |
* Callback for mapping link fields. |
41 | 41 |
*/ |
42 |
function link_feeds_set_target(FeedsSource $source, $entity, $target, array $values) { |
|
42 |
function link_feeds_set_target(FeedsSource $source, $entity, $target, array $values, array $mapping) { |
|
43 |
$language = $mapping['language']; |
|
44 |
|
|
43 | 45 |
list($field_name, $column) = explode(':', $target); |
44 | 46 |
|
45 |
$field = isset($entity->$field_name) ? $entity->$field_name : array('und' => array());
|
|
47 |
$field = isset($entity->$field_name) ? $entity->$field_name : array($language => array());
|
|
46 | 48 |
$delta = 0; |
47 | 49 |
|
48 | 50 |
foreach ($values as $value) { |
... | ... | |
51 | 53 |
} |
52 | 54 |
|
53 | 55 |
if (is_scalar($value)) { |
54 |
$field['und'][$delta][$column] = (string) $value;
|
|
56 |
$field[$language][$delta][$column] = (string) $value;
|
|
55 | 57 |
} |
56 | 58 |
$delta++; |
57 | 59 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules