? 1001590-5_path_alias.patch Index: plugins/FeedsNodeProcessor.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/feeds/plugins/FeedsNodeProcessor.inc,v retrieving revision 1.69.2.16 diff -u -u -p -r1.69.2.16 FeedsNodeProcessor.inc --- plugins/FeedsNodeProcessor.inc 16 Dec 2010 19:45:45 -0000 1.69.2.16 +++ plugins/FeedsNodeProcessor.inc 19 Dec 2010 01:32:42 -0000 @@ -206,6 +206,9 @@ class FeedsNodeProcessor extends FeedsPr $target_node->feeds['suppress_import'] = TRUE; } break; + case 'path_alias': + $target_node->path['alias'] = $value; + break; default: parent::setTargetElement($source, $target_node, $target_element, $value); break; @@ -252,6 +255,13 @@ class FeedsNodeProcessor extends FeedsPr 'optional_unique' => TRUE, ); } + // If path is enabled expose path alias. + if (module_exists('path')) { + $targets['path_alias'] = array( + 'name' => t('Path alias'), + 'description' => t('URL path alias for node'), + ); + } // Let other modules expose mapping targets. self::loadMappers(); Index: plugins/FeedsTermProcessor.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/feeds/plugins/FeedsTermProcessor.inc,v retrieving revision 1.25.2.14 diff -u -u -p -r1.25.2.14 FeedsTermProcessor.inc --- plugins/FeedsTermProcessor.inc 29 Oct 2010 21:19:06 -0000 1.25.2.14 +++ plugins/FeedsTermProcessor.inc 19 Dec 2010 01:32:42 -0000 @@ -107,6 +107,20 @@ class FeedsTermProcessor extends FeedsPr } /** + * Override setTargetElement to operate on a target item that is a node. + */ + public function setTargetElement(FeedsSource $source, $target_term, $target_element, $value) { + switch ($target_element) { + case 'path_alias': + $target_term->path['alias'] = $value; + break; + default: + parent::setTargetElement($source, $target_term, $target_element, $value); + break; + } + } + + /** * Return available mapping targets. */ public function getMappingTargets() { @@ -122,6 +136,13 @@ class FeedsTermProcessor extends FeedsPr 'description' => t('Description of the taxonomy term.'), ), ); + // If path is enabled expose path alias. + if (module_exists('path')) { + $targets['path_alias'] = array( + 'name' => t('Path alias'), + 'description' => t('URL path alias for term.'), + ); + } // Let implementers of hook_feeds_term_processor_targets() add their targets. try { self::loadMappers(); Index: plugins/FeedsUserProcessor.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/feeds/plugins/FeedsUserProcessor.inc,v retrieving revision 1.22.2.11 diff -u -u -p -r1.22.2.11 FeedsUserProcessor.inc --- plugins/FeedsUserProcessor.inc 16 Dec 2010 17:21:02 -0000 1.22.2.11 +++ plugins/FeedsUserProcessor.inc 19 Dec 2010 01:32:42 -0000 @@ -141,6 +141,9 @@ class FeedsUserProcessor extends FeedsPr case 'created': $target_user->created = feeds_to_unixtime($value, REQUEST_TIME); break; + case 'path_alias': + $target_user->path['alias'] = $value; + break; default: parent::setTargetElement($source, $target_user, $target_element, $value); break; @@ -175,6 +178,13 @@ class FeedsUserProcessor extends FeedsPr 'optional_unique' => TRUE, ); } + // If path is enabled expose path alias. + if (module_exists('path')) { + $targets['path_alias'] = array( + 'name' => t('Path alias'), + 'description' => t('URL path alias for user.'), + ); + } // Let other modules expose mapping targets. self::loadMappers();