favorite_nodes_add() and favorite_nodes_delete() have
module_invoke_all() calls to allow other modules to act
on user's adding or deleting nodes to their favorite nodes
list.

favorite_nodes_add() passes the operation 'add' and the node
object to the hook_favorite_nodes whereas favorite_nodes_delete()
passes the operation 'delete' and just the node nid to the
hook_favorite_nodes.

For consistency sake the node object should be passed to both
hook_favorite_nodes operations.

Comments

jaydub’s picture

actually now that I look at it, the code to invoke the
hook_favorite_nodes for the delete operation passes
in the $node variable but that variable is not set in
the containing function favorite_nodes_delete().

kbahey’s picture

Status: Active » Fixed

Fixed in 5.x and 6.x, both in -dev.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.