function workflow_node_update in Workflow 7
Implements hook_node_update().
File
- ./
workflow.node.inc, line 113 - Node specific functions, remnants of nodeapi.
Code
function workflow_node_update($node) {
// Skip if there are no workflows.
if ($workflow = workflow_get_workflows_by_type($node->type)) {
// Get new state from workflow form, stored in $node->workflow.
$new_sid = isset($node->workflow) ? $node->workflow : 0;
if ($new_sid) {
workflow_transition($node, $new_sid);
}
}
}