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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
d57c8562
Commit
d57c8562
authored
Jun 21, 2009
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 498318: Speed up field-descs.none.tmpl
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=bbaetz, a=mkanat
parent
6a23b833
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
Template.pm
Bugzilla/Template.pm
+8
-0
field-descs.none.tmpl
template/en/default/global/field-descs.none.tmpl
+1
-5
No files found.
Bugzilla/Template.pm
View file @
d57c8562
...
@@ -781,6 +781,14 @@ sub create {
...
@@ -781,6 +781,14 @@ sub create {
# Allow templates to generate a token themselves.
# Allow templates to generate a token themselves.
'issue_hash_token'
=>
\&
Bugzilla::Token::
issue_hash_token
,
'issue_hash_token'
=>
\&
Bugzilla::Token::
issue_hash_token
,
# A way for all templates to get at Field data, cached.
'bug_fields'
=>
sub
{
my
$cache
=
Bugzilla
->
request_cache
;
$cache
->
{
template_bug_fields
}
||=
{
map
{
$_
->
name
=>
$_
}
Bugzilla
->
get_fields
()
};
return
$cache
->
{
template_bug_fields
};
},
# These don't work as normal constants.
# These don't work as normal constants.
DB_MODULE
=>
\&
Bugzilla::Constants::
DB_MODULE
,
DB_MODULE
=>
\&
Bugzilla::Constants::
DB_MODULE
,
REQUIRED_MODULES
=>
REQUIRED_MODULES
=>
...
...
template/en/default/global/field-descs.none.tmpl
View file @
d57c8562
...
@@ -91,14 +91,10 @@
...
@@ -91,14 +91,10 @@
Description here, by copying their Description from the
Description here, by copying their Description from the
database. If you want to override this for your language
database. If you want to override this for your language
or your installation, just use a hook. %]
or your installation, just use a hook. %]
[%# Also create the bug_fields hash. %]
[% UNLESS Param('shutdownhtml') %]
[% UNLESS Param('shutdownhtml') %]
[% USE Bugzilla %]
[% FOREACH bz_field = bug_fields.values %]
[% SET bug_fields = {} %]
[% FOREACH bz_field = Bugzilla.get_fields() %]
[% SET field_descs.${bz_field.name} = bz_field.description
[% SET field_descs.${bz_field.name} = bz_field.description
IF !field_descs.${bz_field.name}.defined %]
IF !field_descs.${bz_field.name}.defined %]
[% SET bug_fields.${bz_field.name} = bz_field %]
[% END %]
[% END %]
[% END %]
[% 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