You are here

function _workflow_write_history in Workflow 6

Same name and namespace in other branches
  1. 5.2 workflow.module \_workflow_write_history()
  2. 5 workflow.module \_workflow_write_history()
  3. 6.2 workflow.module \_workflow_write_history()
4 calls to _workflow_write_history()
workflow_execute_transition in ./workflow.module
Execute a transition (change state of a node).
workflow_nodeapi in ./workflow.module
Implementation of hook_nodeapi().
workflow_state_delete in ./workflow.module
Delete a workflow state from the database, including any transitions the state was involved in and any associations with actions that were made to that transition.
_workflow_node_to_state in ./workflow.module
Put a node into a state. No permission checking here; only call this from other functions that know what they're doing.

File

./workflow.module, line 1063
Support workflows made up of arbitrary states.

Code

function _workflow_write_history($node, $sid, $comment) {
  global $user;
  db_query("INSERT INTO {workflow_node_history} (nid, old_sid, sid, uid, comment, stamp) VALUES (%d, %d, %d, %d, '%s', %d)", $node->nid, $node->_workflow, $sid, $user->uid, $comment, $node->workflow_stamp);
}