aboutsummaryrefslogtreecommitdiffstats
path: root/show_bug.cgi
diff options
context:
space:
mode:
authorgerv%gerv.net <>2003-01-15 15:59:48 +0000
committergerv%gerv.net <>2003-01-15 15:59:48 +0000
commit7d4370dc8cff507254e7b44de0fc462dcb28d52f (patch)
tree9bc77893dc01d4886ae8d1c66bdfc0d8e923ff1e /show_bug.cgi
parent77b86e4c02e0057a573594afdd84ba15c643a4fc (diff)
downloadbugs-7d4370dc8cff507254e7b44de0fc462dcb28d52f.tar
bugs-7d4370dc8cff507254e7b44de0fc462dcb28d52f.tar.gz
bugs-7d4370dc8cff507254e7b44de0fc462dcb28d52f.tar.bz2
bugs-7d4370dc8cff507254e7b44de0fc462dcb28d52f.tar.xz
bugs-7d4370dc8cff507254e7b44de0fc462dcb28d52f.zip
Bug 136603 - show_bug.cgi's XML retrieval needs a summary mode. Patch by gerv; r=bbaetz, a=justdave.
Diffstat (limited to 'show_bug.cgi')
-rwxr-xr-xshow_bug.cgi23
1 files changed, 22 insertions, 1 deletions
diff --git a/show_bug.cgi b/show_bug.cgi
index 52c7f83f9..80e53e616 100755
--- a/show_bug.cgi
+++ b/show_bug.cgi
@@ -76,9 +76,30 @@ my @bug_list;
if ($::COOKIE{"BUGLIST"}) {
@bug_list = split(/:/, $::COOKIE{"BUGLIST"});
}
+
$vars->{'bug_list'} = \@bug_list;
+# Work out which fields we are displaying (currently XML only.)
+# If no explicit list is defined, we show all fields. We then exclude any
+# on the exclusion list. This is so you can say e.g. "Everything except
+# attachments" without listing almost all the fields.
+my @fieldlist = (Bug::fields(), 'group', 'long_desc', 'attachment');
+my %displayfields;
+
+if ($cgi->param("field")) {
+ @fieldlist = $cgi->param("field");
+}
+
+foreach (@fieldlist) {
+ $displayfields{$_} = 1;
+}
+
+foreach ($cgi->param("excludefield")) {
+ $displayfields{$_} = undef;
+}
+
+$vars->{'displayfields'} = \%displayfields;
+
print "Content-type: $format->{'ctype'}\n\n";
$template->process("$format->{'template'}", $vars)
|| ThrowTemplateError($template->error());
-