diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-03-18 06:56:55 -0700 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-03-18 06:56:55 -0700 |
commit | 1c13174e8f4307020c1e4738cefbcba8a75a7c18 (patch) | |
tree | 6c84a8cbbff2e7cdafc21f7404c834220c8a2f70 | |
parent | Bug 553255: Make config.cgi use Bugzilla::Product::preload, for a small (diff) | |
download | bugzilla-1c13174e8f4307020c1e4738cefbcba8a75a7c18.tar.gz bugzilla-1c13174e8f4307020c1e4738cefbcba8a75a7c18.tar.bz2 bugzilla-1c13174e8f4307020c1e4738cefbcba8a75a7c18.zip |
Bug 553267: Allow specifying that you don't want flag data, for config.cgi
r=gerv, a=mkanat
-rwxr-xr-x | config.cgi | 9 | ||||
-rw-r--r-- | template/en/default/config.rdf.tmpl | 70 |
2 files changed, 46 insertions, 33 deletions
diff --git a/config.cgi b/config.cgi index 4fcf2b1f9..abf267840 100755 --- a/config.cgi +++ b/config.cgi @@ -80,6 +80,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; diff --git a/template/en/default/config.rdf.tmpl b/template/en/default/config.rdf.tmpl index e8050489a..ec80f7601 100644 --- a/template/en/default/config.rdf.tmpl +++ b/template/en/default/config.rdf.tmpl @@ -163,17 +163,19 @@ <bz:component rdf:about="[% urlbase FILTER xml %]component.cgi?name=[% component.name FILTER url_quote %]&product=[% product.name FILTER url_quote %]"> <bz:name>[% component.name FILTER html %]</bz:name> - <bz:flag_types> - <Seq> - [% flag_types = component.flag_types.bug.merge(component.flag_types.attachment) %] - [% FOREACH flag_type = flag_types %] - [% NEXT UNLESS flag_type.is_active %] - [% all_visible_flag_types.${flag_type.id} = flag_type %] - <li resource="[% urlbase FILTER xml %]flag.cgi?id=[% flag_type.id FILTER url_quote - %]&name=[% flag_type.name FILTER url_quote %]" /> - [% END %] - </Seq> - </bz:flag_types> + [% IF show_flags %] + <bz:flag_types> + <Seq> + [% flag_types = component.flag_types.bug.merge(component.flag_types.attachment) %] + [% FOREACH flag_type = flag_types %] + [% NEXT UNLESS flag_type.is_active %] + [% all_visible_flag_types.${flag_type.id} = flag_type %] + <li resource="[% urlbase FILTER xml %]flag.cgi?id=[% flag_type.id FILTER url_quote + %]&name=[% flag_type.name FILTER url_quote %]" /> + [% END %] + </Seq> + </bz:flag_types> + [% END %] </bz:component> </li> [% END %] @@ -211,28 +213,30 @@ </bz:target_milestones> [% END %] - <bz:flag_types> - <Seq> - [% FOREACH flag_type = all_visible_flag_types.values.sort('name') %] - <li> - <bz:flag_type rdf:about="[% urlbase FILTER xml %]flag.cgi?id=[% flag_type.id FILTER url_quote - %]&name=[% flag_type.name FILTER url_quote %]"> - <bz:id>[% flag_type.id FILTER html %]</bz:id> - <bz:name>[% flag_type.name FILTER html %]</bz:name> - <bz:description>[% flag_type.description FILTER html %]</bz:description> - <bz:type>[% flag_type.target_type FILTER html %]</bz:type> - <bz:requestable>[% flag_type.is_requestable FILTER html %]</bz:requestable> - <bz:specifically_requestable>[% flag_type.is_requesteeble FILTER html %]</bz:specifically_requestable> - <bz:multiplicable>[% flag_type.is_multiplicable FILTER html %]</bz:multiplicable> - [% IF user.in_group("editcomponents") %] - <bz:grant_group>[% flag_type.grant_group.name FILTER html %]</bz:grant_group> - <bz:request_group>[% flag_type.request_group.name FILTER html %]</bz:request_group> - [% END %] - </bz:flag_type> - </li> - [% END %] - </Seq> - </bz:flag_types> + [% IF show_flags %] + <bz:flag_types> + <Seq> + [% FOREACH flag_type = all_visible_flag_types.values.sort('name') %] + <li> + <bz:flag_type rdf:about="[% urlbase FILTER xml %]flag.cgi?id=[% flag_type.id FILTER url_quote + %]&name=[% flag_type.name FILTER url_quote %]"> + <bz:id>[% flag_type.id FILTER html %]</bz:id> + <bz:name>[% flag_type.name FILTER html %]</bz:name> + <bz:description>[% flag_type.description FILTER html %]</bz:description> + <bz:type>[% flag_type.target_type FILTER html %]</bz:type> + <bz:requestable>[% flag_type.is_requestable FILTER html %]</bz:requestable> + <bz:specifically_requestable>[% flag_type.is_requesteeble FILTER html %]</bz:specifically_requestable> + <bz:multiplicable>[% flag_type.is_multiplicable FILTER html %]</bz:multiplicable> + [% IF user.in_group("editcomponents") %] + <bz:grant_group>[% flag_type.grant_group.name FILTER html %]</bz:grant_group> + <bz:request_group>[% flag_type.request_group.name FILTER html %]</bz:request_group> + [% END %] + </bz:flag_type> + </li> + [% END %] + </Seq> + </bz:flag_types> + [% END %] <bz:fields> <Seq> |