]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1251221 - Pass cache => 1 to calls to Bugzilla::Product->new() called in Bugzilla...
authorDylan Hardison <dylan@mozilla.com>
Fri, 26 Feb 2016 13:56:16 +0000 (08:56 -0500)
committerDylan Hardison <dylan@mozilla.com>
Fri, 26 Feb 2016 13:56:16 +0000 (08:56 -0500)
r=dkl,a=dylan

Bugzilla/Component.pm
Bugzilla/Milestone.pm
Bugzilla/Version.pm

index 9bc0a449314f9edd54228c3af7df77a04c9de62b..3e50dab80cc1497def474961c4c670ccbd1f26b7 100644 (file)
@@ -390,10 +390,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'};
 }
 
index cf7e3e35f18e7f865e1412814c223f058f2bf3da..9cee522488a3c16672e7f27f23beb2631d48ddbb 100644 (file)
@@ -236,7 +236,7 @@ sub product {
     my $self = shift;
 
     require Bugzilla::Product;
-    $self->{'product'} ||= new Bugzilla::Product($self->product_id);
+    $self->{'product'} ||= Bugzilla::Product->new({ id => $self->product_id, cache => 1 });
     return $self->{'product'};
 }
 
index 4b332ff2bc95d1e935c335ee507f13a0c81e96d7..f6fedeba78a8821c3d6bf2a04a510081d87f1278 100644 (file)
@@ -167,7 +167,7 @@ sub product {
     my $self = shift;
 
     require Bugzilla::Product;
-    $self->{'product'} ||= new Bugzilla::Product($self->product_id);
+    $self->{'product'} ||= Bugzilla::Product->new({ id => $self->product_id, cache => 1 });
     return $self->{'product'};
 }