diff --git a/plugins/FeedsEntityProcessor.inc b/plugins/FeedsEntityProcessor.inc index 0dcf106..c3e3c6f 100644 --- a/plugins/FeedsEntityProcessor.inc +++ b/plugins/FeedsEntityProcessor.inc @@ -27,15 +27,10 @@ class FeedsEntityProcessor extends FeedsProcessor { * The bundle of the entities this processor will create. */ public function bundle() { + $bundle = NULL; $entity_info = $this->entityInfo(); - $bundle = $this->entityType(); - if (isset($entity_info['bundle keys']['bundle'])) { - if (isset($this->config['values'][$entity_info['bundle keys']['bundle']])) { - $bundle = $this->config['values'][$entity_info['bundle keys']['bundle']]; - } - else { - $bundle = NULL; - } + if(!empty($this->config['bundle']) && isset($entity_info['bundles'][$this->config['bundle']])) { + $bundle = $this->config['bundle']; } return $bundle; @@ -74,7 +69,7 @@ class FeedsEntityProcessor extends FeedsProcessor { protected function entitySaveAccess($entity) { // The check will be skipped for anonymous users. - if ($this->config['authorize'] && !empty($entity->uid)) { + if (!empty($this->config['authorize']) && !empty($entity->uid)) { $author = user_load($entity->uid); @@ -190,7 +185,6 @@ class FeedsEntityProcessor extends FeedsProcessor { * Override parent::configFormValidate(). */ public function configFormValidate(&$values) { - $form = parent::configFormValidate($values); $wrapper = entity_metadata_wrapper($this->entityType());