function node_get_by_revision_uuid in Universally Unique IDentifier 6
Returns the node associated with a revision UUID.
Parameters
$revision_uuid: The uuid to use for the node lookup.
Return value
Either the $node object, or FALSE on failure.
File
- ./
uuid.module, line 185 - Main module functions for the uuid module.
Code
function node_get_by_revision_uuid($revision_uuid) {
$node = db_fetch_object(db_query(db_rewrite_sql("SELECT n.nid, n.vid\n FROM {node} AS n\n INNER JOIN {uuid_node_revisions} AS unr ON n.vid = unr.vid\n WHERE unr.uuid = '%s'"), $revision_uuid));
if ($node->nid && $node->vid) {
return node_load($node->nid, $node->vid);
}
else {
return FALSE;
}
}