Hi,
I use node_load/node_save a lot for programmatic node creation/update.
Currently, scheduler does not have the 'load' action hook for nodeapi. This causes problems for the usual node_load/node_save scripts that I use. I could make direct calls to the scheduler database table, but then 'update' and 'insert' actions are already there and invoked by node_save.
So I've added some code to hook on to the 'load' action as well.
I hope this helps someone else, and kindly review this for inclusion.
Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| scheduler_nodeapi-load_patch.txt | 1.05 KB | freeman-1 |
Comments
Comment #1
AjK commentedCommitted, thanks!
Some points as I didn't apply the patch you supplied but tweaked it.
.
Comment #2
freeman-1 commentedThanks for the quick review, changes and inclusion. I'm still a little rough around the edges on Drupal conventions/best-practices :-)
I guess putting the settings/fields under the ->scheduler array is a cleaner approach (like taxonomy) although there'd need to be some code to assign them to ->(un)publish_on if i run loops using the current module and node_save.
I suppose a future ToDo would include getting the other actions to handle ->scheduler as an array/object (and not need the code mentioned above) ?
If so, I'd be glad to chip in later on.
Comment #3
AjK commentedAll patches welcome! :)
Comment #4
(not verified) commented