It would be useful to have the option to automatically delete feed items when their associated feed importer node is deleted. This should be straightforward with hook_nodeapi(). Patch to follow.

CommentFileSizeAuthor
#3 954814_3.patch2.2 KBWill White
#1 954814_1.patch2.21 KBWill White
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Will White’s picture

Status: Active » Needs review
FileSize
2.21 KB

This patch add an option to the data processor. Similar options could be added to processors. During the "delete" op, hook_nodeapi() now checks for this option and runs clear() on the source if the option is true.

alex_b’s picture

Status: Needs review » Needs work

Looks good.

A) Can we call this option 'delete_with_source' or sth similarily descriptive (not delete_with_node though)?
B) Title should be much shorter "Delete with source", description can stay the same.

This is surprisingly simple!

Will White’s picture

Status: Needs work » Needs review
FileSize
2.2 KB

Hi Alex,
Here is an updated patch with the changes you suggested.

Thanks,
Will

alex_b’s picture

Status: Needs review » Needs work

Will... we should cover this with a test.

This functionality is going to go into the next MN release and it's going to be one of these things that we won't notice if it breaks. The test should be *very quick* to write. If you have any questions around it, please poke me.

twistor’s picture

Will White’s picture

Status: Needs work » Closed (duplicate)

Wow your patch is almost identical.

hellomobe’s picture

May I have assistance with how to add this to 7.x 2.x version.