diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2014-01-07 06:13:41 +0100 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2014-01-07 06:13:41 +0100 |
commit | 14ece482a9028897f3877e157fdad172f9eeb6eb (patch) | |
tree | c0bd56d68740d6c16929bb9f65cd43e49a6e0d0d /attachment.cgi | |
parent | 678ad6b0f33fbd05da033ce04f14e14951aa7a9e (diff) | |
download | bugzilla-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-x | attachment.cgi | 5 |
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}; |