summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-04-05 21:26:27 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2015-04-05 21:26:27 +0200
commitcb8ec961ded401de227b023a7ff813330d0f3a08 (patch)
tree09bba5f1b4694f996409ce731bc83e5ee4b4f1de /template/en/default/bug
parentd1c18ff2567cdaf9969fe719e30e3823e0fae738 (diff)
downloadbugzilla-cb8ec961ded401de227b023a7ff813330d0f3a08.tar.gz
bugzilla-cb8ec961ded401de227b023a7ff813330d0f3a08.tar.xz
Bug 1143864: Replace |FILTER bug_link| in loops by direct calls to bug/link.html.tmpl to improve performance
r=dkl a=sgreen
Diffstat (limited to 'template/en/default/bug')
-rw-r--r--template/en/default/bug/edit.html.tmpl7
-rw-r--r--template/en/default/bug/link.html.tmpl2
2 files changed, 5 insertions, 4 deletions
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl
index f23c6b85c..3ac7f6821 100644
--- a/template/en/default/bug/edit.html.tmpl
+++ b/template/en/default/bug/edit.html.tmpl
@@ -565,7 +565,7 @@
<td class="field_value" colspan="2">
<span id="duplicates">
[% FOREACH dupe = bug.duplicates %]
- [% dupe.id FILTER bug_link(dupe, use_alias => 1) FILTER none %][% " " %]
+ [% INCLUDE bug/link.html.tmpl bug = dupe, link_text = dupe.id, use_alias = 1 %][% " " %]
[% END %]
</span>
(<a href="buglist.cgi?bug_id=[% bug.duplicate_ids.join(",") FILTER html %]">
@@ -1014,10 +1014,9 @@
value="[% bug.${field.name}.join(', ') FILTER html %]">
[% END %]
</span>
-
+
[% FOREACH dep_bug = deps %]
- [% dep_bug.id FILTER bug_link(dep_bug, use_alias => 1)
- FILTER none %][% " " %]
+ [% INCLUDE bug/link.html.tmpl bug = dep_bug, link_text = dep_bug.id, use_alias = 1 %][% " " %]
[% END %]
[% IF bug.check_can_change_field(field.name, 0, 1) %]
<span id="[% field.name FILTER html %]_edit_container"
diff --git a/template/en/default/bug/link.html.tmpl b/template/en/default/bug/link.html.tmpl
index b63093302..f1e8d041a 100644
--- a/template/en/default/bug/link.html.tmpl
+++ b/template/en/default/bug/link.html.tmpl
@@ -8,6 +8,8 @@
[%# INTERFACE:
# bug: a Bugzilla::Bug object
+ # user: the Bugzilla::User object to which this template is addressed.
+ # If not set, the currently logged in user object is used.
# link_text: the text that we're highlighting.
# use_alias: boolean; If true, we display the bug's alias as the link
# text instead of link_text.