If I understand the code correctly (and there's a good chance that I don't), there is support for actions module, so nodequeues can be manipulated when other actions occur. But there doesn't appear to be a way to do something when the queue itself is manipulated. I'd like to add a nodeapi operation called 'nodequeue' for this purpose.

I've attached a 5.x patch, because that's the version I'm using that needs this. But a 6.x version would be equally easy. If such a hook existed, then the apachesolr specific code in the 6.x version wouldn't need to exist.

There's a small downside to using hook_nodeapi in 5.x, because several modules hook's will be called. But IIRC, in 6.x we worked around this with op dispatch functions, so that shouldn't be an issue. An alternative option to using hook_nodeapi is to create a hook_nodequeue, but I like putting this with nodeapi, because we're taking an action on the node.

CommentFileSizeAuthor
#1 491482.patch1.7 KBdouggreen
nodeapi.patch682 bytesdouggreen

Comments

douggreen’s picture

StatusFileSize
new1.7 KB

After using this a little, I think that the operation can't act on nodeapi, because many of the queue operations are on the entire queue and not just a node ... so here's another attempted patch.

douggreen’s picture

Title: provide nodeapi hook when adding/deleting » provide hook when adding/deleting
amateescu’s picture

Status: Active » Closed (won't fix)

Not needed for 6.x and 7.x.