diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2012-03-06 18:05:35 +0100 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2012-03-06 18:05:35 +0100 |
commit | 2bea3e2abd44e07198199eb9ac86aebc4c3f0f2a (patch) | |
tree | ef462db8ce5b5140f3b644c2bf82891772e249f9 /template/en/default/attachment | |
parent | 22114cb2da0ec6e9939d0d03b4714d74b7cad71f (diff) | |
download | bugzilla-2bea3e2abd44e07198199eb9ac86aebc4c3f0f2a.tar.gz bugzilla-2bea3e2abd44e07198199eb9ac86aebc4c3f0f2a.tar.xz |
Bug 732189 - Backport 731562 to bmo: Cache the global/user.html.tmpl template, r=glob
https://bugzilla.mozilla.org/show_bug.cgi?id=731562
Diffstat (limited to 'template/en/default/attachment')
-rw-r--r-- | template/en/default/attachment/list.html.tmpl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/template/en/default/attachment/list.html.tmpl b/template/en/default/attachment/list.html.tmpl index fa8e4774e..5079a0eec 100644 --- a/template/en/default/attachment/list.html.tmpl +++ b/template/en/default/attachment/list.html.tmpl @@ -64,6 +64,7 @@ function toggle_display(link) { [% count = 0 %] [% obsolete_attachments = 0 %] + [% user_cache = template_cache.users %] [% FOREACH attachment = attachments %] [% count = count + 1 %] @@ -102,7 +103,14 @@ function toggle_display(link) { title="Go to the comment associated with the attachment"> [%- attachment.attached FILTER time %]</a>, - [% INCLUDE global/user.html.tmpl who = attachment.attacher %] + [%# No need to recreate the exact same template if we already have it. %] + [% attacher_id = attachment.attacher.id %] + [% UNLESS user_cache.$attacher_id %] + [% user_cache.$attacher_id = BLOCK %] + [% INCLUDE global/user.html.tmpl who = attachment.attacher %] + [% END %] + [% END %] + [% user_cache.$attacher_id FILTER none %] </span> </td> |