function state_flow_prevent_live_revision in State Machine 6
Same name and namespace in other branches
- 7 modules/state_flow/state_flow.module \state_flow_prevent_live_revision()
- 7.2 modules/state_flow/state_flow.module \state_flow_prevent_live_revision()
1 call to state_flow_prevent_live_revision()
- state_flow_node_update in modules/
state_flow/ state_flow.module - Implementation of hook_node_update().
File
- modules/
state_flow/ state_flow.module, line 280 - A base implementation of the state machine class and its relationship to revisions
Code
function state_flow_prevent_live_revision($nid) {
$revision_state = state_flow_live_revision($nid);
if ($revision_state != NULL) {
$live_version = state_flow_revision_info($revision_state['vid']);
db_query("UPDATE {node} SET vid = %d, changed = '%s', title = '%s', status = 1 WHERE nid = %d", $live_version->vid, $live_version->timestamp, $live_version->title, $nid);
}
}