Hello,

I needed node_import to be able to skip records under certain conditions. So I extended node_import_read_from_file():

  • It accepts an additional $type parameter
  • It invokes hook_node_import_skip_record() passing the $type as well as the record as array.
    If any implementation ot the hook returns true a $skip flag is set (which is also used to replace the nasty recursion)
  • It returns $skip as 3rd value

Although I haven't created own tests yet, the ones coming w/ node_import pass fine.

The patch was created against 6.x-1.x-dev using svn and contains the new hook as well as node_import_read_from_file changes and necessary changes in node_import[.admin].inc

CommentFileSizeAuthor
node_import_skip.patch7.02 KBspyfalcon