Commit f4e0626f authored by Simon Green's avatar Simon Green

Bug 880113 - Use the cache for the product and component name

r=LpSolit, a=glob
parent 0ba623b7
...@@ -3288,11 +3288,8 @@ sub cc_users { ...@@ -3288,11 +3288,8 @@ sub cc_users {
sub component { sub component {
my ($self) = @_; my ($self) = @_;
return $self->{component} if exists $self->{component};
return '' if $self->{error}; return '' if $self->{error};
($self->{component}) = Bugzilla->dbh->selectrow_array( $self->{component} //= $self->component_obj->name;
'SELECT name FROM components WHERE id = ?',
undef, $self->{component_id});
return $self->{component}; return $self->{component};
} }
...@@ -3492,11 +3489,8 @@ sub percentage_complete { ...@@ -3492,11 +3489,8 @@ sub percentage_complete {
sub product { sub product {
my ($self) = @_; my ($self) = @_;
return $self->{product} if exists $self->{product};
return '' if $self->{error}; return '' if $self->{error};
($self->{product}) = Bugzilla->dbh->selectrow_array( $self->{product} //= $self->product_obj->name;
'SELECT name FROM products WHERE id = ?',
undef, $self->{product_id});
return $self->{product}; return $self->{product};
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment