function revisioning_get_latest_revision_id in Revisioning 8
Same name and namespace in other branches
- 6.4 revisioning_api.inc \revisioning_get_latest_revision_id()
- 6.3 revisioning_api.inc \revisioning_get_latest_revision_id()
- 7 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.
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();
}