You are here

function _revisioning_node_is_pending in Revisioning 6.3

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

Return TRUE when either of the following is true: o the supplied node has at least one revision more recent than the current o the node is not yet published and consists of a single revision

Relies on vid, current_revision_id and num_revisions set on the node object, see function node_tools_nodeapi()

Parameters

$node:

Return value

TRUE, if node is pending according to the above definition

2 calls to _revisioning_node_is_pending()
revisioning_condition_revision_is in ./revisioning.rules.inc
revisioning_nodeapi in ./revisioning.module
Implementation of hook_nodeapi().

File

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

Code

function _revisioning_node_is_pending($node) {
  return $node->vid > $node->current_revision_id || !$node->status && $node->num_revisions == 1;
}