You are here

function revisioning_events_argument_current_revision in Revisioning 6.3

Same name and namespace in other branches
  1. 8 revisioning.rules.inc \revisioning_events_argument_current_revision()
  2. 6.4 revisioning.rules.inc \revisioning_events_argument_current_revision()
  3. 7 revisioning.rules.inc \revisioning_events_argument_current_revision()

Current revision event argument handler.

1 string reference to 'revisioning_events_argument_current_revision'
_revisioning_rules_event_arguments in ./revisioning.rules.inc
Returns arguments suitable for using it with a node.

File

./revisioning.rules.inc, line 186
Rules integration for Revisioning module.

Code

function revisioning_events_argument_current_revision($node) {
  $current_vid = node_tools_get_current_node_revision_id($node->nid);
  if ($node->vid != $current_vid) {
    $current = node_load($node->nid, $current_vid);
    return $current;
  }
  return $node;
}