You are here

function revisioning_get_latest_revision_id in Revisioning 6.3

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

Get the id of the latest revision belonging to a node.

Parameters

$nid, id of the node:

Return value

ID of the latest revision.

7 calls to revisioning_get_latest_revision_id()
revisioning_handler_field_node_state::render in views/revisioning_handler_field_node_state.inc
Implement the rendering of the state value.
_revisioning_edit in ./revisioning.module
Callback for the primary Edit tab.
_revisioning_form_submit in ./revisioning.pages.inc
Handler for the 'Save' button on the edit form.
_revisioning_load_op in ./revisioning.module
_revisioning_view in ./revisioning.module
Menu callback for the primary View tab.

... See full list

File

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

Code

function revisioning_get_latest_revision_id($nid) {
  return db_result(db_query('SELECT MAX(vid) FROM {node_revisions} WHERE nid=%d', $nid));
}