You are here

function _revisioning_revertpublish_revision in Revisioning 6.4

Same name and namespace in other branches
  1. 8 revisioning_api.inc \_revisioning_revertpublish_revision()
  2. 6.3 revisioning_api.inc \_revisioning_revertpublish_revision()
  3. 7 revisioning_api.inc \_revisioning_revertpublish_revision()

Revert node to selected revision without changing its publication status.

Parameters

$node: Target $node object (loaded with target revision) or nid of target node

$vid: Optional vid of revision to revert to, if provided $node must not be an object.

File

./revisioning_api.inc, line 164
API functions of Revisioning module

Code

function _revisioning_revertpublish_revision(&$node, $vid = NULL) {
  $node_revision = is_object($node) ? $node : node_load($node, $vid);
  module_invoke_all('revisionapi', 'pre revert', $node_revision);
  _revisioning_revert_revision($node_revision);
  module_invoke_all('revisionapi', 'post revert', $node_revision);
}