aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-04-05 21:31:10 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2015-04-05 21:31:10 +0200
commit467bef6d90360a43bfdcaf2d24985cb171435bf9 (patch)
tree427413c3e153d9bafcb6dfd1e80402cea1706cf8 /template/en/default/bug
parentBug 1128194: Remove 'umask 0' from post_bug.cgi (diff)
downloadbugzilla-467bef6d90360a43bfdcaf2d24985cb171435bf9.tar.gz
bugzilla-467bef6d90360a43bfdcaf2d24985cb171435bf9.tar.bz2
bugzilla-467bef6d90360a43bfdcaf2d24985cb171435bf9.zip
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 2eb850dd6..708032c44 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.