From 40cec31b70098cc0916ace383d426d812d19d044 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 5 Nov 2005 20:24:29 +0000 Subject: [PATCH] =?utf8?q?Bug=20315129:=20[PostgreSQL]=20Attachments=20are?= =?utf8?q?=20sorted=20by=20last=20changed=20time=20instead=20of=20creation?= =?utf8?q?=20time=20-=20Patch=20by=20Fr=C3=A9d=C3=A9ric=20Buclin=20=20r=3Dmyk=20a=3Djustdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Bugzilla/Attachment.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index c4e7580ae5..bb40e74c94 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -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; -- 2.47.2