function revisioning_get_number_of_revisions in Revisioning 7
Same name and namespace in other branches
- 8 revisioning_api.inc \revisioning_get_number_of_revisions()
Get the number of revisions belonging to a node.
Parameters
int $nid: id of the node
Return value
int A count representing the number of revisions associated with the node
5 calls to revisioning_get_number_of_revisions()
- revisioning_form_alter in ./
revisioning.pages.inc - Implements hook_form_alter().
- revisioning_handler_field_node_number_of_revisions::render in views/
revisioning_handler_field_node_number_of_revisions.inc - Render data.
- revisioning_handler_field_node_state::render in views/
revisioning_handler_field_node_state.inc - Implement the rendering of the state value.
- revisioning_handler_field_revision_state::render in views/
revisioning_handler_field_revision_state.inc - Render the data.
- revisioning_set_node_revision_info in ./
revisioning_api.inc - Set node revision info.
File
- ./
revisioning_api.inc, line 69 - API functions of Revisioning module
Code
function revisioning_get_number_of_revisions($nid) {
$result = db_query("SELECT COUNT(vid) FROM {node_revision} WHERE nid = :nid", array(
':nid' => $nid,
));
return $result
->fetchField();
}