summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Component.pm
diff options
context:
space:
mode:
authorDylan Hardison <dylan@mozilla.com>2016-02-26 14:56:16 +0100
committerDylan William Hardison <dylan@hardison.net>2016-02-26 17:45:14 +0100
commit09ff147a1c3acf3fa16be5a9dce8b8658dbd5819 (patch)
treeaa2bff20fdd837ed0fa27b67835bfbb9857e3155 /Bugzilla/Component.pm
parentacf546d91e5e14002abf149bf500666a09765031 (diff)
downloadbugzilla-09ff147a1c3acf3fa16be5a9dce8b8658dbd5819.tar.gz
bugzilla-09ff147a1c3acf3fa16be5a9dce8b8658dbd5819.tar.xz
Bug 1251221 - Pass cache => 1 to calls to Bugzilla::Product->new() called in Bugzilla::{Milestone,Version,Component}
r=dkl,a=dylan
Diffstat (limited to 'Bugzilla/Component.pm')
-rw-r--r--Bugzilla/Component.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/Bugzilla/Component.pm b/Bugzilla/Component.pm
index 0fe6fb25a..74c3ae99a 100644
--- a/Bugzilla/Component.pm
+++ b/Bugzilla/Component.pm
@@ -405,10 +405,9 @@ sub initial_cc {
sub product {
my $self = shift;
- if (!defined $self->{'product'}) {
- require Bugzilla::Product; # We cannot |use| it.
- $self->{'product'} = new Bugzilla::Product($self->product_id);
- }
+
+ require Bugzilla::Product;
+ $self->{'product'} ||= Bugzilla::Product->new({ id => $self->product_id, cache => 1 });
return $self->{'product'};
}