By brettev on
I am trying to call an action based on whether or not a CCK field has been altered on a node edit. What hook can I use or what can I do to detect a change in the cck field and trigger an action? I don't think I can get it through the $object of an action, and I don't think I can get it through the $node or $a3 or $a4 in the hook_node_api.
Any ideas on how I can detect this change?
Brett
Comments
Surely you can make this
Surely you can make this comparison in 'presave'.
Would I pull from the db and
Would I pull from the db and compare it from what is in the $node object? I guess that would work. It'd be an extra hit to the db, but it wouldn't be an expensive one. Hmm...
Well, calls to node_load()
Well, calls to node_load() are cached, so it wouldn't be too bad. It has probably already been loaded on that page call, which means no extra hit.
-Corey