Commit 6d7e7bb8 authored by Dries's avatar Dries
Browse files

- Patch #300714 by j0hn-smith, lilou, alexj, linuxbox: sort node revisions by vid not timestamp.

parent f041110b
...@@ -2033,7 +2033,7 @@ function node_last_changed($nid) { ...@@ -2033,7 +2033,7 @@ function node_last_changed($nid) {
*/ */
function node_revision_list($node) { function node_revision_list($node) {
$revisions = array(); $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_revision} r LEFT JOIN {node} n ON n.vid = r.vid INNER JOIN {users} u ON u.uid = r.uid WHERE r.nid = :nid ORDER BY r.timestamp DESC', array(':nid' => $node->nid)); $result = db_query('SELECT r.vid, r.title, r.log, r.uid, n.vid AS current_vid, r.timestamp, u.name FROM {node_revision} r LEFT JOIN {node} n ON n.vid = r.vid INNER JOIN {users} u ON u.uid = r.uid WHERE r.nid = :nid ORDER BY r.vid DESC', array(':nid' => $node->nid));
foreach ($result as $revision) { foreach ($result as $revision) {
$revisions[$revision->vid] = $revision; $revisions[$revision->vid] = $revision;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment