function revisioning_rules_action_load_current in Revisioning 8
Same name and namespace in other branches
- 6.4 revisioning.rules.inc \revisioning_rules_action_load_current()
- 6.3 revisioning.rules.inc \revisioning_rules_action_load_current()
- 7 revisioning.rules.inc \revisioning_rules_action_load_current()
Action: load current revision of provided node.
File
- ./
revisioning.rules.inc, line 249 - Rules integration for Revisioning module.
Code
function revisioning_rules_action_load_current($node) {
// Or revisioning_get_current_node_revision_id($node->nid); ?
$current_vid = $node->current_revision_id;
if ($node->vid != $current_vid) {
$current = node_load($node->nid, $current_vid);
return array(
'loaded_current_revision' => $current,
);
}
return array(
'loaded_current_revision' => $node,
);
}