#57307, order files by fid, patch by Robert Douglass

4.7.x
Gerhard Killesreiter 2006-04-08 18:35:35 +00:00
parent b8b5956ee0
commit 8ce5fe4d1f
2 changed files with 2 additions and 2 deletions

View File

@ -595,7 +595,7 @@ function upload_load($node) {
$files = array();
if ($node->vid) {
$result = db_query('SELECT * FROM {files} f INNER JOIN {file_revisions} r ON f.fid = r.fid WHERE r.vid = %d', $node->vid);
$result = db_query('SELECT * FROM {files} f INNER JOIN {file_revisions} r ON f.fid = r.fid WHERE r.vid = %d ORDER BY f.fid DESC', $node->vid);
while ($file = db_fetch_object($result)) {
$files[$file->fid] = $file;
}

View File

@ -595,7 +595,7 @@ function upload_load($node) {
$files = array();
if ($node->vid) {
$result = db_query('SELECT * FROM {files} f INNER JOIN {file_revisions} r ON f.fid = r.fid WHERE r.vid = %d', $node->vid);
$result = db_query('SELECT * FROM {files} f INNER JOIN {file_revisions} r ON f.fid = r.fid WHERE r.vid = %d ORDER BY f.fid DESC', $node->vid);
while ($file = db_fetch_object($result)) {
$files[$file->fid] = $file;
}