You are here

function state_flow_get_history in State Machine 6

Same name and namespace in other branches
  1. 7 modules/state_flow/state_flow.module \state_flow_get_history()
  2. 7.2 modules/state_flow/state_flow.module \state_flow_get_history()

Retrieve the states history for a node.

Parameters

int $nid:

Return value

array

1 call to state_flow_get_history()
state_flow_events in modules/state_flow/state_flow.module
Show the states as a node tab

File

modules/state_flow/state_flow.module, line 99
A base implementation of the state machine class and its relationship to revisions

Code

function state_flow_get_history($nid) {
  $query = "SELECT * FROM {node_revision_states} WHERE nid = %d AND status = 1";
  $result = db_query($query, $nid);
  $history = array();
  while ($record = db_fetch_object($result)) {
    $history[] = $record;
  }
  return $history;
}