From a9382ed37a49838f42fb18d20efa7d0722c8a8c8 Mon Sep 17 00:00:00 2001 From: Chris Leppanen <chris.leppanen@gmail.com> Date: Thu, 12 Jul 2012 11:32:35 -0700 Subject: [PATCH] Use entity type if entity label is not set. --- feeds.rules.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/feeds.rules.inc b/feeds.rules.inc index 4dd583ac..49049fb4 100644 --- a/feeds.rules.inc +++ b/feeds.rules.inc @@ -15,12 +15,14 @@ function feeds_rules_event_info() { $config = $importer->getConfig(); $processor = feeds_plugin($config['processor']['plugin_key'], $importer->id); $entity_type = $processor->entityType(); + $label = isset($entity_info[$entity_type]['label']) ? $entity_info[$entity_type]['label'] : $entity_type; + $info['feeds_import_'. $importer->id] = array( 'label' => t('Before saving an item imported via @name.', array('@name' => $importer->config['name'])), 'group' => t('Feeds'), 'variables' => array( $entity_type => array( - 'label' => t('Imported @label', array('@label' => $entity_info[$entity_type]['label'])), + 'label' => t('Imported @label', array('@label' => $label)), 'type' => $entity_type, // Saving is handled by feeds anyway (unless the skip action is used). 'skip save' => TRUE, -- GitLab