You are here

function node_tools_get_current_node_revision_id in Module Grants 6.4

Same name and namespace in other branches
  1. 6.3 node_tools/node_tools.module \node_tools_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

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

Return value

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

1 call to node_tools_get_current_node_revision_id()
node_tools_nodeapi in node_tools/node_tools.module
Implementation of hook_nodeapi().

File

node_tools/node_tools.module, line 53
Generic reusable functions involving node objects.

Code

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