Returns the revision values of a node.
object $values: An object containing all retrieved values.
string $op: The operation being performed.
array A numerically indexed array containing the current node object and the revision ID for this row.
function get_revision_entity($values, $op) {
$vid = $this
->get_value($values, 'node_vid');
$node = $this
->get_value($values);
// Unpublished nodes ignore access control.
$node->status = 1;
// Ensure user has access to perform the operation on this node.
if (!node_access($op, $node)) {
return array(
$node,
NULL,
);
}
return array(
$node,
$vid,
);
}