You are here

function revisioning_get_number_of_archived_revisions in Revisioning 6.3

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

Get the number of archived revisions belonging to a node.

Parameters

$nid, id of the node:

Return value

A count representing the number of archived revisions for the node Returns zero if there is only one (i.e. the current) revision.

3 calls to revisioning_get_number_of_archived_revisions()
revisioning_delete_archived_action in ./revisioning_triggers_actions.inc
Implementation of delete archived action.
revisioning_delete_archived_confirm in ./revisioning.pages.inc
_revisioning_generate_node_links_according_to_permissions in ./revisioning_theme.inc
Return an array of hyperlinks representing the operations the logged-in user is allowed to perform on the supplied node.

File

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

Code

function revisioning_get_number_of_archived_revisions($node) {
  return db_result(db_query('SELECT COUNT(vid) FROM {node_revisions} WHERE nid = %d AND vid < %d', $node->nid, $node->current_revision_id));
}