summaryrefslogtreecommitdiffstats
path: root/attachment.cgi
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2014-01-07 06:13:41 +0100
committerDave Lawrence <dlawrence@mozilla.com>2014-01-07 06:13:41 +0100
commit14ece482a9028897f3877e157fdad172f9eeb6eb (patch)
treec0bd56d68740d6c16929bb9f65cd43e49a6e0d0d /attachment.cgi
parent678ad6b0f33fbd05da033ce04f14e14951aa7a9e (diff)
downloadbugzilla-14ece482a9028897f3877e157fdad172f9eeb6eb.tar.gz
bugzilla-14ece482a9028897f3877e157fdad172f9eeb6eb.tar.xz
Bug 956052 - backport upstream bug 945535 to bmo/4.2 for performance improvement in bugs with large number of attachments
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-xattachment.cgi5
1 files changed, 2 insertions, 3 deletions
diff --git a/attachment.cgi b/attachment.cgi
index 57706d5e0..18ac6f57a 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -459,9 +459,8 @@ sub diff {
sub viewall {
# Retrieve and validate parameters
my $bug = Bugzilla::Bug->check({ id => scalar $cgi->param('bugid'), cache => 1 });
- my $bugid = $bug->id;
- my $attachments = Bugzilla::Attachment->get_attachments_by_bug($bugid);
+ my $attachments = Bugzilla::Attachment->get_attachments_by_bug($bug);
# Ignore deleted attachments.
@$attachments = grep { $_->datasize } @$attachments;
@@ -637,7 +636,7 @@ sub edit {
my $attachment = validateID();
my $bugattachments =
- Bugzilla::Attachment->get_attachments_by_bug($attachment->bug_id);
+ Bugzilla::Attachment->get_attachments_by_bug($attachment->bug);
my $any_flags_requesteeble =
grep { $_->is_requestable && $_->is_requesteeble } @{$attachment->flag_types};