diff options
author | Dylan Hardison <dylan@mozilla.com> | 2014-04-14 21:19:40 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2014-04-14 21:20:58 +0200 |
commit | 43572dfe14612f989a7722f2c64610b6f1e6dc56 (patch) | |
tree | 4c0f00272a9df95253c1fa3de6a54fe7efe40565 | |
parent | 4769d007bce5a1ebb449b53d5a5fe8b552bc74e7 (diff) | |
download | bugzilla-43572dfe14612f989a7722f2c64610b6f1e6dc56.tar.gz bugzilla-43572dfe14612f989a7722f2c64610b6f1e6dc56.tar.xz |
Bug 993913 - remove the %user_cache from inline history, and ensure the object cache is always used
r=dkl
-rw-r--r-- | extensions/InlineHistory/Extension.pm | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/extensions/InlineHistory/Extension.pm b/extensions/InlineHistory/Extension.pm index 6c86fcfa8..803262517 100644 --- a/extensions/InlineHistory/Extension.pm +++ b/extensions/InlineHistory/Extension.pm @@ -62,12 +62,6 @@ sub template_before_process { # allow other extensions to alter history Bugzilla::Hook::process('inline_history_activtiy', { activity => $activity }); - # prime caches with objects already loaded - my %user_cache; - foreach my $comment (@{$bug->comments}) { - $user_cache{$comment->{author}->login} = $comment->{author}; - } - my %attachment_cache; foreach my $attachment (@{$bug->attachments}) { $attachment_cache{$attachment->id} = $attachment; @@ -79,8 +73,8 @@ sub template_before_process { # augment and tweak foreach my $operation (@$activity) { # make operation.who an object - $user_cache{$operation->{who}} ||= Bugzilla::User->new({ name => $operation->{who} }); - $operation->{who} = $user_cache{$operation->{who}}; + $operation->{who} = + Bugzilla::User->new({ name => $operation->{who}, cache => 1 }); for (my $i = 0; $i < scalar(@{$operation->{changes}}); $i++) { my $change = $operation->{changes}->[$i]; |