function state_flow_live_revision in State Machine 6
Same name and namespace in other branches
- 7 modules/state_flow/state_flow.module \state_flow_live_revision()
- 7.2 modules/state_flow/state_flow.module \state_flow_live_revision()
1 call to state_flow_live_revision()
- state_flow_prevent_live_revision in modules/
state_flow/ state_flow.module
File
- modules/
state_flow/ state_flow.module, line 289 - A base implementation of the state machine class and its relationship to revisions
Code
function state_flow_live_revision($nid) {
$state = 'published';
$query = "SELECT *\n FROM {node_revision_states}\n WHERE nid = %d AND state = '%s'\n ORDER BY timestamp\n DESC\n LIMIT 1";
$revision_state = db_fetch_array(db_query($query, $nid, $state));
return $revision_state;
}