You are here

function revisioning_get_latest_revision_id in Revisioning 7

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

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

Parameters

int $nid: id of the node

Return value

int ID of the latest revision.

7 calls to revisioning_get_latest_revision_id()
revisioning_content_is_moderated in ./revisioning_api.inc
Return whether the supplied content type is subject to moderation.
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_load_op in ./revisioning.module
Load a revision.
_revisioning_ux_revisioning_title_for_edit_and_view in revisioning_ux/revisioning_ux.module
Get title for edit and view.

... See full list

File

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

Code

function revisioning_get_latest_revision_id($nid) {
  $result = db_query("SELECT MAX(vid) FROM {node_revision} WHERE nid = :nid", array(
    ':nid' => $nid,
  ));
  return $result
    ->fetchField();
}