summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Attachment.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Attachment.pm')
-rw-r--r--Bugzilla/Attachment.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm
index f853cff04..dafdf70ad 100644
--- a/Bugzilla/Attachment.pm
+++ b/Bugzilla/Attachment.pm
@@ -99,13 +99,14 @@ sub _retrieve {
'attachments.isprivate AS isprivate'
);
my $columns = join(", ", @columns);
-
- my $records = Bugzilla->dbh->selectall_arrayref("SELECT $columns
- FROM attachments
- WHERE attach_id IN (" .
- join(",", @$ids) . ")
- ORDER BY attach_id",
- { Slice => {} });
+ my $dbh = Bugzilla->dbh;
+ my $records = $dbh->selectall_arrayref(
+ "SELECT $columns
+ FROM attachments
+ WHERE "
+ . Bugzilla->dbh->sql_in('attach_id', $ids)
+ . " ORDER BY attach_id",
+ { Slice => {} });
return $records;
}