You are here

function node_node_revision_operation_delete in Revision scheduler 7

Node revision operation callback: delete revision.

1 string reference to 'node_node_revision_operation_delete'
node_entity_revision_operation_info in ./revision_scheduler.module
Implements hook_entity_revision_operation_info() on behalf of node.module.

File

./revision_scheduler.module, line 867

Code

function node_node_revision_operation_delete($node) {
  if (node_revision_delete($node->vid)) {
    drupal_set_message(t('Revision from %revision-date of @type %title has been deleted.', array(
      '%revision-date' => format_date($node->revision_timestamp),
      '@type' => node_type_get_name($node),
      '%title' => $node->title,
    )));
  }
  else {
    throw new Exception(t('Unable to delete node @nid revision @vid.', array(
      '@nid' => $node->nid,
      '@vid' => $node->vid,
    )));
  }
}