summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-11-05 21:24:29 +0100
committerlpsolit%gmail.com <>2005-11-05 21:24:29 +0100
commit40cec31b70098cc0916ace383d426d812d19d044 (patch)
treec5e2ef1c75df628a659bae99526d08d1f8e1389f
parent07e4290192060ff9b30b03b60155396603a00547 (diff)
downloadbugzilla-40cec31b70098cc0916ace383d426d812d19d044.tar.gz
bugzilla-40cec31b70098cc0916ace383d426d812d19d044.tar.xz
Bug 315129: [PostgreSQL] Attachments are sorted by last changed time instead of creation time - Patch by Frédéric Buclin <LpSolit@gmail.com> r=myk a=justdave
-rw-r--r--Bugzilla/Attachment.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm
index c4e7580ae..bb40e74c9 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;