Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
467bef6d
Commit
467bef6d
authored
Apr 05, 2015
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1143864: Replace |FILTER bug_link| in loops by direct calls to…
Bug 1143864: Replace |FILTER bug_link| in loops by direct calls to bug/link.html.tmpl to improve performance r=dkl a=sgreen
parent
038774ed
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
+13
-11
edit.html.tmpl
template/en/default/bug/edit.html.tmpl
+2
-3
link.html.tmpl
template/en/default/bug/link.html.tmpl
+2
-0
bugmail.html.tmpl
template/en/default/email/bugmail.html.tmpl
+9
-8
No files found.
template/en/default/bug/edit.html.tmpl
View file @
467bef6d
...
...
@@ -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 %]">
...
...
@@ -1016,8 +1016,7 @@
</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"
...
...
template/en/default/bug/link.html.tmpl
View file @
467bef6d
...
...
@@ -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.
...
...
template/en/default/email/bugmail.html.tmpl
View file @
467bef6d
...
...
@@ -20,9 +20,10 @@
[% FOREACH comment = new_comments.reverse %]
<div>
[% IF comment.count %]
<b>
[% "Comment # ${comment.count}" FILTER bug_link(bug,
{comment_num => comment.count, full_url => 1, user => to_user}) FILTER none %]
on [% "$terms.bug $bug.id" FILTER bug_link(bug, { full_url => 1, user => to_user }) FILTER none %]
<b>
[% INCLUDE bug/link.html.tmpl bug = bug, link_text = "Comment # ${comment.count}",
comment_num = comment.count, full_url = 1, user = to_user %]
on [% INCLUDE bug/link.html.tmpl bug = bug, link_text = "$terms.bug $bug.id",
full_url = 1, user = to_user %]
from [% INCLUDE global/user.html.tmpl user = to_user, who = comment.author %]
</b>
[% END %]
<pre>
[% comment.body_full({ wrap => 1 }) FILTER quoteUrls(bug, comment, to_user) %]
</pre>
...
...
@@ -75,14 +76,14 @@
[% SET in_table = 0 %]
[% END %]
[% IF change.blocker %]
[% "${terms.Bug} ${bug.id}" FILTER bug_link(bug, {full_url => 1, user => to_user}) FILTER none
%]
[% INCLUDE bug/link.html.tmpl bug = bug, link_text = "$terms.Bug $bug.id", full_url = 1, user = to_user
%]
depends on
[%+ "${terms.bug} ${change.blocker.id}"
FILTER bug_link(change.blocker, {full_url => 1, user => to_user}) FILTER none
%],
[%+ INCLUDE bug/link.html.tmpl bug = change.blocker, link_text = "$terms.bug $change.blocker.id",
full_url = 1, user = to_user
%],
which changed state.
[% ELSE %]
[% INCLUDE global/user.html.tmpl user = to_user, who = change.who %] changed
[%+ "${terms.bug} ${bug.id}" FILTER bug_link(bug, {full_url => 1, user => to_user}) FILTER none
%]
[%+ INCLUDE bug/link.html.tmpl bug = bug, link_text = "$terms.bug $bug.id", full_url = 1, user = to_user
%]
[% END %]
<br>
[% IF in_table == 0 %]
...
...
@@ -106,7 +107,7 @@
<th>
[% field_label FILTER html %]
</th>
<td>
[% IF change.field_name == "bug_id" %]
[%
new_value FILTER bug_link(bug, {full_url => 1, user => to_user}) FILTER none
%]
[%
INCLUDE bug/link.html.tmpl bug = bug, link_text = new_value, full_url = 1, user = to_user
%]
[% ELSE %]
[% new_value FILTER html %]
[% END %]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment