You are here

function _revisioning_prepare_msg in Revisioning 6.3

Same name and namespace in other branches
  1. 6.4 revisioning.module \_revisioning_prepare_msg()
1 call to _revisioning_prepare_msg()
revisioning_nodeapi in ./revisioning.module
Implementation of hook_nodeapi().

File

./revisioning.module, line 804
Allows the creation and modification of pre-published as well as live content while the current revision remains unchanged and publicly visible until the changes have been reviewed by a moderator.

Code

function _revisioning_prepare_msg($node) {
  if (!$node->nid) {

    // new node
    return;
  }
  $count = _revisioning_get_number_of_revisions_newer_than($node->vid, $node->nid);
  if ($count == 1) {
    drupal_set_message(t('Please note there is one revision more recent than the one you are about to edit.'), 'warning');
  }
  elseif ($count > 1) {
    drupal_set_message(t('Please note there are !count revisions more recent than the one you are about to edit.', array(
      '!count' => $count,
    )), 'warning');
  }
}