function _get_current_revision in Revisioning 6
Get 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 revision is to be returned. @return An object containing revision id (vid) and revision timestamp only
3 calls to _get_current_revision()
- revisioning_nodeapi in ./
revisioning.module - Implementation of hook_nodeapi().
- revisioning_publish_latest_revision in ./
revisioning.module - Find the most recent pending revision and make it current, unless it already is.
- _handle_view_op in ./
revisioning.module - Handle the 'view' operation on the node, displaying links as per the user's access permission.
File
- ./
revisioning.module, line 650
Code
function _get_current_revision($nid) {
return db_fetch_object(db_query('SELECT r.vid, r.timestamp FROM {node} n INNER JOIN {node_revisions} r ON n.vid=r.vid WHERE n.nid=%d', $nid));
}