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
$typeparameter - It invokes
hook_node_import_skip_record()passing the$typeas well as the record as array.
If any implementation ot the hook returnstruea$skipflag is set (which is also used to replace the nasty recursion) - It returns
$skipas 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
| Comment | File | Size | Author |
|---|---|---|---|
| node_import_skip.patch | 7.02 KB | spyfalcon |