Index: plugins/FeedsUserProcessor.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/feeds/plugins/FeedsUserProcessor.inc,v retrieving revision 1.18 diff -r1.18 FeedsUserProcessor.inc 2c2 < // $Id: FeedsUserProcessor.inc,v 1.18 2010/07/27 20:27:41 alexb Exp $ --- > // $Id: FeedsUserProcessor.inc,v 1.17 2010/07/18 19:47:37 alexb Exp $ 27a28,33 > > // Add attributes inherited from the source feed node to the node. > if ($source->feed_nid) { > $feed_node = node_load($source->feed_nid); > $this->inherit($feed_node, $account); > } 82a89,90 > > return FEEDS_BATCH_COMPLETE; 117a126 > 'inherit' => array(), 152a162,183 > > $disabled = !feeds_importer($this->id)->config['content_type']; > $defaults = array(); > $options = array(); > foreach ($this->getInheritors() as $key => $info) { > $options[$key] = sprintf('%s', $info['description'], $info['name']); > $defaults[$key] = $disabled ? 0 : (isset($this->config['inherit'][$key]) ? $this->config['inherit'][$key] : 0); > } > > $description = $disabled ? > t('Only available for importers that are attached to a content type (Basic settings).') : > t('Copy one or more properties from the feed node to feed item nodes created by this importer.'); > > $form['inherit'] = array( > '#type' => 'checkboxes', > '#title' => t('Inherit from feed node'), > '#description' => $description, > '#default_value' => array_keys(array_filter($defaults)), > '#disabled' => $disabled, > '#options' => $options, > ); > 223a255,278 > > /** > * Invoke inheritors depending on configuration. > */ > protected function inherit($feed_node, $new_user) { > $inheritors = $this->getInheritors(); > foreach ($this->config['inherit'] as $key => $value) { > if ($value && function_exists($inheritors[$key]['callback'])) { > $inheritors[$key]['callback']($feed_node, $new_user); > } > } > } > > /** > * Get a list of available inheritors. > */ > protected function getInheritors() { > $inheritors = array(); > // Let other modules expose inheritors. > self::loadMappers(); > drupal_alter('feeds_user_processor_inheritors', $inheritors); > return $inheritors; > } >