function node_revision_list in Drupal 6
Same name and namespace in other branches
- 4 modules/node.module \node_revision_list()
- 5 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/ node.pages.inc - Generate an overview table of older revisions of a node.
File
- modules/
node/ node.module, line 1633 - The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.
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.vid DESC', $node->nid);
while ($revision = db_fetch_object($result)) {
$revisions[$revision->vid] = $revision;
}
return $revisions;
}