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

Now all getMappingSources() return values are homogenous. Remove complexity from form code.

parent a91148e5
No related branches found
No related tags found
No related merge requests found
...@@ -500,9 +500,8 @@ function feeds_ui_mapping_form(&$form_state, $importer) { ...@@ -500,9 +500,8 @@ function feeds_ui_mapping_form(&$form_state, $importer) {
if ($sources = $importer->parser->getMappingSources()) { if ($sources = $importer->parser->getMappingSources()) {
$source_options = _feeds_ui_format_options($sources); $source_options = _feeds_ui_format_options($sources);
foreach ($sources as $k => $source) { foreach ($sources as $k => $source) {
// @todo: make format homogenous. $legend['sources'][$k]['name']['#value'] = empty($source['name']) ? $k : $source['name'];
$legend['sources'][$k]['name']['#value'] = is_array($source) ? $source['name'] : $source; $legend['sources'][$k]['description']['#value'] = empty($source['description']) ? '' : $source['description'];
$legend['sources'][$k]['description']['#value'] = (is_array($source) && !empty($source['description'])) ? $source['description'] : '';
} }
} }
else { else {
......
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