You are here

function _revisioning_node_is_pending in Revisioning 7

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. 6.3 revisioning_api.inc \_revisioning_node_is_pending()

Check for a pending revision.

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 revisioning_set_node_revision_info()

Parameters

object $node: The node object

Return value

bool TRUE, if node is pending according to the above definition

1 call to _revisioning_node_is_pending()
revisioning_set_node_revision_info in ./revisioning_api.inc
Set node revision info.

File

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

Code

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