Commit 7ff5e333 authored by Max Kanat-Alexander's avatar Max Kanat-Alexander

Bug 553267: Allow specifying that you don't want flag data, for config.cgi

r=gerv, a=mkanat
parent bec7e429
......@@ -83,6 +83,15 @@ if ($cgi->param('product')) {
Bugzilla::Product::preload($vars->{'products'});
# Allow consumers to specify whether or not they want flag data.
if (defined $cgi->param('flags')) {
$vars->{'show_flags'} = $cgi->param('flags');
}
else {
# We default to sending flag data.
$vars->{'show_flags'} = 1;
}
# Create separate lists of open versus resolved statuses. This should really
# be made part of the configuration.
my @open_status;
......
......@@ -163,6 +163,7 @@
<bz:component rdf:about="[% urlbase FILTER xml %]component.cgi?name=[% component.name FILTER url_quote
%]&amp;product=[% product.name FILTER url_quote %]">
<bz:name>[% component.name FILTER html %]</bz:name>
[% IF show_flags %]
<bz:flag_types>
<Seq>
[% flag_types = component.flag_types.bug.merge(component.flag_types.attachment) %]
......@@ -174,6 +175,7 @@
[% END %]
</Seq>
</bz:flag_types>
[% END %]
</bz:component>
</li>
[% END %]
......@@ -211,6 +213,7 @@
</bz:target_milestones>
[% END %]
[% IF show_flags %]
<bz:flag_types>
<Seq>
[% FOREACH flag_type = all_visible_flag_types.values.sort('name') %]
......@@ -233,6 +236,7 @@
[% END %]
</Seq>
</bz:flag_types>
[% END %]
<bz:fields>
<Seq>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment