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
03543739
Commit
03543739
authored
Apr 13, 2012
by
Frank Becker
Committed by
Frédéric Buclin
Apr 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 340439: Include classifications in config.cgi
r/a=LpSolit
parent
d0abf012
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
1 deletion
+32
-1
config.cgi
config.cgi
+12
-0
config.rdf.tmpl
template/en/default/config.rdf.tmpl
+20
-1
No files found.
config.cgi
View file @
03543739
...
@@ -69,6 +69,18 @@ if ($cgi->param('product')) {
...
@@ -69,6 +69,18 @@ if ($cgi->param('product')) {
# We set the 2nd argument to 1 to also preload flag types.
# We set the 2nd argument to 1 to also preload flag types.
Bugzilla::Product::
preload
(
$vars
->
{
'products'
},
1
);
Bugzilla::Product::
preload
(
$vars
->
{
'products'
},
1
);
if
(
Bugzilla
->
params
->
{
'useclassification'
})
{
my
$class
=
{};
# Get all classifications with at least one selectable product.
foreach
my
$product
(
@
{
$vars
->
{
'products'
}})
{
$class
->
{
$product
->
classification_id
}
||=
$product
->
classification
;
}
my
@classifications
=
sort
{
$a
->
sortkey
<=>
$b
->
sortkey
||
lc
(
$a
->
name
)
cmp
lc
(
$b
->
name
)}
(
values
%
$class
);
$vars
->
{
'class_names'
}
=
$class
;
$vars
->
{
'classifications'
}
=
\
@classifications
;
}
# Allow consumers to specify whether or not they want flag data.
# Allow consumers to specify whether or not they want flag data.
if
(
defined
$cgi
->
param
(
'flags'
))
{
if
(
defined
$cgi
->
param
(
'flags'
))
{
$vars
->
{
'show_flags'
}
=
$cgi
->
param
(
'flags'
);
$vars
->
{
'show_flags'
}
=
$cgi
->
param
(
'flags'
);
...
...
template/en/default/config.rdf.tmpl
View file @
03543739
...
@@ -105,6 +105,23 @@
...
@@ -105,6 +105,23 @@
[% END %]
[% END %]
[% IF Param('useclassification') %]
<bz:classifications>
<Seq>
[% FOREACH classification = classifications %]
<li>
<bz:classification rdf:about="[% escaped_urlbase %]classification.cgi?name=
[% classification.name FILTER uri %]">
<bz:name>[% classification.name FILTER html %]</bz:name>
<bz:description>[% classification.description FILTER html %]</bz:description>
<bz:sortkey>[% classification.sortkey FILTER html %]</bz:sortkey>
</bz:classification>
</li>
[% END %]
</Seq>
</bz:classifications>
[% END %]
<bz:products>
<bz:products>
<Seq>
<Seq>
[% FOREACH product = products %]
[% FOREACH product = products %]
...
@@ -112,7 +129,9 @@
...
@@ -112,7 +129,9 @@
<bz:product rdf:about="[% escaped_urlbase %]product.cgi?name=[% product.name FILTER uri %]">
<bz:product rdf:about="[% escaped_urlbase %]product.cgi?name=[% product.name FILTER uri %]">
<bz:name>[% product.name FILTER html %]</bz:name>
<bz:name>[% product.name FILTER html %]</bz:name>
<bz:allows_unconfirmed>[% product.allows_unconfirmed FILTER html %]</bz:allows_unconfirmed>
<bz:allows_unconfirmed>[% product.allows_unconfirmed FILTER html %]</bz:allows_unconfirmed>
[% IF Param('useclassification') %]
<bz:classification>[% class_names.${product.classification_id}.name FILTER html %]</bz:classification>
[% END %]
<bz:components>
<bz:components>
<Seq>
<Seq>
[% FOREACH component = product.components %]
[% FOREACH component = product.components %]
...
...
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