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

DamienMcKenna - March 29, 2009 - 21:55
Status:active» needs review

File attached has a new function called install_publish_node() to do this.

AttachmentSize
install_profile_api-n417670-publish_node.patch 597 bytes

#2

James Andres - September 24, 2009 - 17:30
Status:needs review» won't fix

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=0 do we create functions for these also?

I think it is better to stick to the standard Drupal API of node_load() and node_save().

 
 

Drupal is a registered trademark of Dries Buytaert.