]> 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 William Hardison <dylan@hardison.net>
Fri, 26 Feb 2016 16:45:14 +0000 (11:45 -0500)
r=dkl,a=dylan

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

index 0fe6fb25a84ef31853ac1fd29ed575ae7d90b56b..74c3ae99ae49558826444d5a3aa79da5bce6b3dc 100644 (file)
@@ -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'};
 }
 
index d8fcd79a526c4196bebc4708650e9d0f53c29c94..78eacb3e9739a06bc67450798844333bc941b48e 100644 (file)
@@ -245,7 +245,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 7f53add138996e95094a0deb847f9259bd5d5fa1..2e0854afea649904aa5ce8754455f2fa776b1e57 100644 (file)
@@ -162,7 +162,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'};
 }