]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 315129: [PostgreSQL] Attachments are sorted by last changed time instead of creat...
authorlpsolit%gmail.com <>
Sat, 5 Nov 2005 20:24:29 +0000 (20:24 +0000)
committerlpsolit%gmail.com <>
Sat, 5 Nov 2005 20:24:29 +0000 (20:24 +0000)
Bugzilla/Attachment.pm

index c4e7580ae58e36f11a7eeff06ee1805daa8cd207..bb40e74c94b44e7e333bcf05372ebe31cefe3b7e 100644 (file)
@@ -100,7 +100,8 @@ sub _retrieve {
     my $records = Bugzilla->dbh->selectall_arrayref("SELECT $columns
                                                      FROM attachments
                                                      WHERE attach_id IN (" .
-                                                     join(",", @$ids) . ")",
+                                                     join(",", @$ids) . ")
+                                                     ORDER BY attach_id",
                                                     { Slice => {} });
     return $records;
 }
@@ -394,8 +395,7 @@ sub get_attachments_by_bug {
     my ($class, $bug_id) = @_;
     my $attach_ids = Bugzilla->dbh->selectcol_arrayref("SELECT attach_id
                                                         FROM attachments
-                                                        WHERE bug_id = ?
-                                                        ORDER BY attach_id",
+                                                        WHERE bug_id = ?",
                                                        undef, $bug_id);
     my $attachments = Bugzilla::Attachment->get_list($attach_ids);
     return $attachments;