summaryrefslogtreecommitdiffstats
path: root/xml.cgi
diff options
context:
space:
mode:
authorbbaetz%student.usyd.edu.au <>2002-12-15 18:23:55 +0100
committerbbaetz%student.usyd.edu.au <>2002-12-15 18:23:55 +0100
commit1cee4770ca5e09e3b56c0de0e8c77c2684542d18 (patch)
treea31b3c625607961094750db3f7619619a9d7767f /xml.cgi
parentee84183ca9efa0839c49ad02f293d60db0a4d76f (diff)
downloadbugzilla-1cee4770ca5e09e3b56c0de0e8c77c2684542d18.tar.gz
bugzilla-1cee4770ca5e09e3b56c0de0e8c77c2684542d18.tar.xz
Bug 158499 - Templatise XML bug output
r=gerv, justdave a=justdave
Diffstat (limited to 'xml.cgi')
-rwxr-xr-xxml.cgi29
1 files changed, 7 insertions, 22 deletions
diff --git a/xml.cgi b/xml.cgi
index 91f8e8c03..f93c0e5c0 100755
--- a/xml.cgi
+++ b/xml.cgi
@@ -28,30 +28,15 @@ use lib qw(.);
require "CGI.pl";
-use Bug;
+our $cgi;
-use vars qw($template $vars $userid %COOKIE);
+# Convert comma/space separated elements into separate params
+my @ids = ();
-ConnectToDatabase();
-quietly_check_login();
-
-if (!defined $::FORM{'id'} || !$::FORM{'id'}) {
- print "Content-Type: text/html\n\n";
- $template->process("bug/choose-xml.html.tmpl", $vars)
- || ThrowTemplateError($template->error());
- exit;
+if (defined $cgi->param('id')) {
+ @ids = split (/[, ]+/, $cgi->param('id'));
}
-my $exporter = $::COOKIE{"Bugzilla_login"} || undef;
-
-my @ids = split (/[, ]+/, $::FORM{'id'});
-
-print "Content-type: text/xml\n\n";
-print Bug::XML_Header(Param("urlbase"), $Bugzilla::Config::VERSION,
- Param("maintainer"), $exporter);
-foreach my $id (@ids) {
- my $bug = new Bug(trim($id), $::userid);
- print $bug->emitXML;
-}
+my $ids = join('', map { $_ = "&id=" . $_ } @ids);
-print Bug::XML_Footer;
+print $cgi->redirect("show_bug.cgi?ctype=xml$ids");