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
9eb2bae3
Commit
9eb2bae3
authored
Mar 30, 2010
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 552167: show_bug.cgi loads flagtypes from the database for each attachment
r/a=mkanat
parent
ad7a26c7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
Flag.pm
Bugzilla/Flag.pm
+5
-3
No files found.
Bugzilla/Flag.pm
View file @
9eb2bae3
...
@@ -54,6 +54,7 @@ whose names start with _ or a re specifically noted as being private.
...
@@ -54,6 +54,7 @@ whose names start with _ or a re specifically noted as being private.
=cut
=cut
use
Scalar::
Util
qw(blessed)
;
use
Scalar::
Util
qw(blessed)
;
use
Storable
qw(dclone)
;
use
Bugzilla::
FlagType
;
use
Bugzilla::
FlagType
;
use
Bugzilla::
Hook
;
use
Bugzilla::
Hook
;
...
@@ -1023,7 +1024,9 @@ sub _flag_types {
...
@@ -1023,7 +1024,9 @@ sub _flag_types {
}
}
# Get all available flag types for the given product and component.
# Get all available flag types for the given product and component.
my
$flag_types
=
Bugzilla::FlagType::
match
(
$vars
);
my
$cache
=
Bugzilla
->
request_cache
->
{
flag_types_per_component
}
->
{
$vars
->
{
target_type
}}
||=
{};
my
$flag_data
=
$cache
->
{
$vars
->
{
component_id
}}
||=
Bugzilla::FlagType::
match
(
$vars
);
my
$flag_types
=
dclone
(
$flag_data
);
$_
->
{
flags
}
=
[]
foreach
@$flag_types
;
$_
->
{
flags
}
=
[]
foreach
@$flag_types
;
my
%
flagtypes
=
map
{
$_
->
id
=>
$_
}
@$flag_types
;
my
%
flagtypes
=
map
{
$_
->
id
=>
$_
}
@$flag_types
;
...
@@ -1033,8 +1036,7 @@ sub _flag_types {
...
@@ -1033,8 +1036,7 @@ sub _flag_types {
# or component).
# or component).
@$flags
=
grep
{
exists
$flagtypes
{
$_
->
type_id
}
}
@$flags
;
@$flags
=
grep
{
exists
$flagtypes
{
$_
->
type_id
}
}
@$flags
;
push
(
@
{
$flagtypes
{
$_
->
type_id
}
->
{
flags
}},
$_
)
foreach
@$flags
;
push
(
@
{
$flagtypes
{
$_
->
type_id
}
->
{
flags
}},
$_
)
foreach
@$flags
;
return
$flag_types
;
return
[
sort
{
$a
->
sortkey
<=>
$b
->
sortkey
||
$a
->
name
cmp
$b
->
name
}
values
%
flagtypes
];
}
}
=head1 SEE ALSO
=head1 SEE ALSO
...
...
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