#57307, order files by fid, patch by Robert Douglass
parent
b8b5956ee0
commit
8ce5fe4d1f
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue