Simple function to publish a node
DamienMcKenna - March 29, 2009 - 21:49
| Project: | Install Profile API |
| Version: | 6.x-2.0 |
| Component: | CRUD functions and includes |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | won't fix |
Description
Webform changes nodes to always be unpublished upon initial save, so we could use a simple function to enable them.

#1
File attached has a new function called install_publish_node() to do this.
#2
Well I agree this is handy, it is highly specific to a single use case and doesn't reduce code complexity. For example, what about settings like
moderate=1, revision=1, status=0do we create functions for these also?I think it is better to stick to the standard Drupal API of
node_load()andnode_save().