diff --git a/plugins/FeedsParser.inc b/plugins/FeedsParser.inc index be20ae1..3cabb61 100644 --- a/plugins/FeedsParser.inc +++ b/plugins/FeedsParser.inc @@ -105,24 +105,25 @@ abstract class FeedsParser extends FeedsPlugin { $sources = array(); $content_type = feeds_importer($this->id)->config['content_type']; drupal_alter('feeds_parser_sources', $sources, $content_type); - if (!feeds_importer($this->id)->config['content_type']) { - return $sources; - } - $sources['parent:uid'] = array( - 'name' => t('Feed node: User ID'), - 'description' => t('The feed node author uid.'), - ); - $sources['parent:nid'] = array( - 'name' => t('Feed node: Node ID'), - 'description' => t('The feed node nid.'), - ); - $sources['parent:title'] = array( - 'name' => t('Feed node: Title'), - 'description' => t('The feed node title.'), - ); - $sources['feed_source:url'] = array( - 'name' => t('Feed source: URL'), - 'description' => t('The URL of the feed source.'), + + if (feeds_importer($this->id)->config['content_type']) { + $sources['parent:uid'] = array( + 'name' => t('Feed node: User ID'), + 'description' => t('The feed node author uid.'), + ); + $sources['parent:nid'] = array( + 'name' => t('Feed node: Node ID'), + 'description' => t('The feed node nid.'), + ); + $sources['parent:title'] = array( + 'name' => t('Feed node: Title'), + 'description' => t('The feed node title.'), + ); + } + + $sources['feed_source:source'] = array( + 'name' => t('Feed source: Source'), + 'description' => t('The address to the feed source.'), ); $sources['feed_importer:name'] = array( 'name' => t('Feed importer: Name'), @@ -177,7 +178,7 @@ abstract class FeedsParser extends FeedsPlugin { $source_config = $source->getConfig(); $fetcher_source = $source_config[get_class($source->importer()->fetcher)]['source']; switch ($element_key) { - case 'feed_source:url': + case 'feed_source:source': return $fetcher_source; } }