You are here

function revisioning_node_has_pending in Revisioning 6.3

Same name and namespace in other branches
  1. 8 revisioning.rules.inc \revisioning_node_has_pending()
  2. 6.4 revisioning.rules.inc \revisioning_node_has_pending()
  3. 7 revisioning.rules.inc \revisioning_node_has_pending()

File

./revisioning.rules.inc, line 38
Rules integration for Revisioning module.

Code

function revisioning_node_has_pending($node, $settings) {
  $nid = is_numeric($node) ? $node : $node->nid;
  $num_pending = _revisioning_get_number_of_pending_revisions($nid);
  return $num_pending > 0 || is_object($node) && !$node->status && ($node->num_revisions = node_tools_get_number_of_revisions($node->nid)) <= 1;
}