You are here

function _revisioning_unpublish_revision in Revisioning 8

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

Unpublish revision (i.e. the node).

Note that no check is made as to whether the initiating user has permission to unpublish this node.

Parameters

object $node: Target $node object or nid of target node

1 call to _revisioning_unpublish_revision()
revisioning_unpublish_confirm_submit in ./revisioning.pages.inc
Submission handler for the unpublish_confirm form.

File

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

Code

function _revisioning_unpublish_revision(&$node) {
  $node_revision = is_object($node) ? $node : node_load($node);
  module_invoke_all('revisionapi', 'pre unpublish', $node_revision);
  _revisioning_unpublish_node($node_revision->nid);
  watchdog('content', 'Unpublished @type %title', array(
    '@type' => $node_revision->type,
    '%title' => $node_revision->title,
  ), WATCHDOG_NOTICE, l(t('view'), "node/{$node_revision->nid}"));
  module_invoke_all('revisionapi', 'post unpublish', $node_revision);
}