function node_revision_list in Drupal 4
Same name and namespace in other branches
- 5 modules/node/node.module \node_revision_list()
- 6 modules/node/node.module \node_revision_list()
- 7 modules/node/node.module \node_revision_list()
Return a list of all the existing revision numbers.
1 call to node_revision_list()
- node_revision_overview in modules/
node.module - Generate an overview table of older revisions of a node.
File
- modules/
node.module, line 1418 - The core that allows content to be submitted to the site.
Code
function node_revision_list($node) {
$revisions = array();
$result = db_query('SELECT r.vid, r.title, r.log, r.uid, n.vid AS current_vid, r.timestamp, u.name FROM {node_revisions} r LEFT JOIN {node} n ON n.vid = r.vid INNER JOIN {users} u ON u.uid = r.uid WHERE r.nid = %d ORDER BY r.timestamp DESC', $node->nid);
while ($revision = db_fetch_object($result)) {
$revisions[] = $revision;
}
return $revisions;
}