Trim whitespace from Asset IDs in CSV imports.
This commit is contained in:
parent
8bbc67a784
commit
247bc024ad
|
@ -56,11 +56,12 @@ function farm_import_feeds_tamper_default() {
|
|||
$export[$feeds_tamper->id] = $feeds_tamper;
|
||||
|
||||
// If an asset reference field exists, explode the "Asset IDs" and "Asset
|
||||
// names" targets into arrays of IDs and names. Trim whitespace from asset
|
||||
// names.
|
||||
// names" targets into arrays of IDs and names and trim whitespace.
|
||||
if (!empty(field_info_instance('log', 'field_farm_asset', $bundle))) {
|
||||
$feeds_tamper = farm_import_feeds_tamper_plugin('log', $bundle, 'Asset IDs', 'explode');
|
||||
$export[$feeds_tamper->id] = $feeds_tamper;
|
||||
$feeds_tamper = farm_import_feeds_tamper_plugin('log', $bundle, 'Asset IDs', 'trim');
|
||||
$export[$feeds_tamper->id] = $feeds_tamper;
|
||||
$feeds_tamper = farm_import_feeds_tamper_plugin('log', $bundle, 'Asset names', 'explode');
|
||||
$export[$feeds_tamper->id] = $feeds_tamper;
|
||||
$feeds_tamper = farm_import_feeds_tamper_plugin('log', $bundle, 'Asset names', 'trim');
|
||||
|
|
Loading…
Reference in New Issue