summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Attachment.pm
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-07-10 19:37:55 +0200
committerDave Lawrence <dlawrence@mozilla.com>2013-07-10 19:37:55 +0200
commit41cbe22c70d6e0299eacc0a09b68b8d1a52c17a4 (patch)
treec8bb5a5c0b12293eaa00fcdf60515fe33ccc39cd /Bugzilla/Attachment.pm
parentb1a8bc55f2b5822405866bf4419f6b9cb49dd503 (diff)
downloadbugzilla-41cbe22c70d6e0299eacc0a09b68b8d1a52c17a4.tar.gz
bugzilla-41cbe22c70d6e0299eacc0a09b68b8d1a52c17a4.tar.xz
Bug 822980 - backport bug 815532 to bmo (Bugzilla::User objects should be cached where appropriate)
r=glob
Diffstat (limited to 'Bugzilla/Attachment.pm')
-rw-r--r--Bugzilla/Attachment.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm
index 094406c91..84bcedbd5 100644
--- a/Bugzilla/Attachment.pm
+++ b/Bugzilla/Attachment.pm
@@ -206,9 +206,8 @@ the user who attached the attachment
sub attacher {
my $self = shift;
- return $self->{attacher} if exists $self->{attacher};
- $self->{attacher} = new Bugzilla::User($self->{submitter_id});
- return $self->{attacher};
+ return $self->{attacher}
+ ||= new Bugzilla::User({ id => $self->{submitter_id}, cache => 1 });
}
=over