You are here

function _revisioning_get_number_of_pending_revisions in Revisioning 6.3

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

Return a count of the number of revisions newer than the current revision.

Parameters

$nid: The id of the node.

Return value

integer

2 calls to _revisioning_get_number_of_pending_revisions()
revisioning_form_node_revision_revert_confirm_alter in ./revisioning.pages.inc
Implementation of hook_form_FORM_ID_alter(), see node.pages.inc/node_revision_revert_confirm()
revisioning_node_has_pending in ./revisioning.rules.inc

File

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

Code

function _revisioning_get_number_of_pending_revisions($nid) {
  return db_result(db_query("SELECT COUNT(*) FROM {node} n INNER JOIN {node_revisions} r ON n.nid=r.nid WHERE (r.vid>n.vid AND n.nid=%d)", $nid));
}