You are here

function _revisioning_revision_is in Revisioning 7

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

Return revision type of the supplied node.

Parameters

object $node: Node object to check

Return value

int Revision type

2 calls to _revisioning_revision_is()
revisioning_condition_revision_is in ./revisioning.rules.inc
Condition: check revision state.
_revisioning_node_info_msg in ./revisioning_api.inc
Return a string with details about the node that is about to be displayed.

File

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

Code

function _revisioning_revision_is(&$node) {
  if ($node->is_pending) {
    return REVISION_PENDING;
  }
  return $node->is_current && $node->status == NODE_PUBLISHED ? REVISION_CURRENT : REVISION_ARCHIVED;
}