diff options
author | Simon Green <sgreen@redhat.com> | 2013-07-25 14:28:54 +1000 |
---|---|---|
committer | Simon Green <sgreen@redhat.com> | 2013-07-25 14:28:54 +1000 |
commit | f4e0626fd893031cf709f37e0fe2d4ee6a18afc8 (patch) | |
tree | e445260f286cfd72f4ce38b1cc1e9b304bddebec /Bugzilla | |
parent | 0ba623b78ff3e5251ee6339ded8adb59ccca52f4 (diff) | |
download | bugs-f4e0626fd893031cf709f37e0fe2d4ee6a18afc8.tar bugs-f4e0626fd893031cf709f37e0fe2d4ee6a18afc8.tar.gz bugs-f4e0626fd893031cf709f37e0fe2d4ee6a18afc8.tar.bz2 bugs-f4e0626fd893031cf709f37e0fe2d4ee6a18afc8.tar.xz bugs-f4e0626fd893031cf709f37e0fe2d4ee6a18afc8.zip |
Bug 880113 - Use the cache for the product and component name
r=LpSolit, a=glob
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Bug.pm | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 40acca871..f27baa532 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -3288,11 +3288,8 @@ sub cc_users { sub component { my ($self) = @_; - return $self->{component} if exists $self->{component}; return '' if $self->{error}; - ($self->{component}) = Bugzilla->dbh->selectrow_array( - 'SELECT name FROM components WHERE id = ?', - undef, $self->{component_id}); + $self->{component} //= $self->component_obj->name; return $self->{component}; } @@ -3492,11 +3489,8 @@ sub percentage_complete { sub product { my ($self) = @_; - return $self->{product} if exists $self->{product}; return '' if $self->{error}; - ($self->{product}) = Bugzilla->dbh->selectrow_array( - 'SELECT name FROM products WHERE id = ?', - undef, $self->{product_id}); + $self->{product} //= $self->product_obj->name; return $self->{product}; } |