You are here

function revisioning_get_current_node_revision_id in Revisioning 7

Same name and namespace in other branches
  1. 8 revisioning_api.inc \revisioning_get_current_node_revision_id()

Get the id of the current revision that the supplied node is pointing to.

Used in cases where the node object wasn't fully loaded or was loaded with a different revision.

Parameters

int $nid: The id of the node whose current revision id is to be returned.

Return value

int A single number being the current revision id (vid).

3 calls to revisioning_get_current_node_revision_id()
revisioning_form_alter in ./revisioning.pages.inc
Implements hook_form_alter().
revisioning_set_node_revision_info in ./revisioning_api.inc
Set node revision info.
_revisioning_publish_latest_revision in ./revisioning_api.inc
Publish latest revision.

File

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

Code

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