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
4c3c583a
Commit
4c3c583a
authored
Jun 19, 2009
by
bbaetz%acm.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 499121 - Cache user objects for Bug::GetComments
r/a=mkanat
parent
4e81c961
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
Bug.pm
Bugzilla/Bug.pm
+5
-1
No files found.
Bugzilla/Bug.pm
View file @
4c3c583a
...
...
@@ -3043,9 +3043,13 @@ sub GetComments {
my
$sth
=
$dbh
->
prepare
(
$query
);
$sth
->
execute
(
@args
);
# Cache the users we look up
my
%
users
;
while
(
my
$comment_ref
=
$sth
->
fetchrow_hashref
())
{
my
%
comment
=
%
$comment_ref
;
$comment
{
'author'
}
=
new
Bugzilla::
User
(
$comment
{
'userid'
});
$users
{
$comment
{
'userid'
}}
||=
new
Bugzilla::
User
(
$comment
{
'userid'
});
$comment
{
'author'
}
=
$users
{
$comment
{
'userid'
}};
# If raw data is requested, do not format 'special' comments.
$comment
{
'body'
}
=
format_comment
(
\%
comment
)
unless
$raw
;
...
...
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