summaryrefslogtreecommitdiffstats
path: root/request.cgi
diff options
context:
space:
mode:
authorGervase Markham <gerv@gerv.net>2013-01-02 18:09:36 +0100
committerGervase Markham <gerv@mozilla.org>2013-01-02 18:09:36 +0100
commit21b50cba4e08e723f8c2d8e8b5800d0a13e2c180 (patch)
tree504bae35d3f49fbbc951567fe07068294a949393 /request.cgi
parentdb29480b097468be60ff0ffbc4344166443ae525 (diff)
downloadbugzilla-21b50cba4e08e723f8c2d8e8b5800d0a13e2c180.tar.gz
bugzilla-21b50cba4e08e723f8c2d8e8b5800d0a13e2c180.tar.xz
Bug 413851 - add CSV output option to request lists. r=LpSolit.
Diffstat (limited to 'request.cgi')
-rwxr-xr-xrequest.cgi15
1 files changed, 11 insertions, 4 deletions
diff --git a/request.cgi b/request.cgi
index 17e6c926d..436f94bc4 100755
--- a/request.cgi
+++ b/request.cgi
@@ -26,8 +26,12 @@ my $cgi = Bugzilla->cgi;
Bugzilla->switch_to_shadow_db;
my $template = Bugzilla->template;
my $action = $cgi->param('action') || '';
+my $format = $template->get_format('request/queue',
+ scalar($cgi->param('format')),
+ scalar($cgi->param('ctype')));
-print $cgi->header();
+$cgi->set_dated_content_disp("inline", "requests", $format->{extension});
+print $cgi->header($format->{'ctype'});
my $fields;
$fields->{'requester'}->{'type'} = 'single';
@@ -42,7 +46,7 @@ unless (defined $cgi->param('requestee')
Bugzilla::User::match_field($fields);
if ($action eq 'queue') {
- queue();
+ queue($format);
}
else {
my $flagtypes = get_flag_types();
@@ -60,7 +64,7 @@ else {
}
$vars->{'components'} = [ sort { $a cmp $b } keys %components ];
- $template->process('request/queue.html.tmpl', $vars)
+ $template->process($format->{'template'}, $vars)
|| ThrowTemplateError($template->error());
}
exit;
@@ -70,6 +74,7 @@ exit;
################################################################################
sub queue {
+ my $format = shift;
my $cgi = Bugzilla->cgi;
my $dbh = Bugzilla->dbh;
my $template = Bugzilla->template;
@@ -295,8 +300,10 @@ sub queue {
}
$vars->{'components'} = [ sort { $a cmp $b } keys %components ];
+ $vars->{'urlquerypart'} = $cgi->canonicalise_query('ctype');
+
# Generate and return the UI (HTML page) from the appropriate template.
- $template->process("request/queue.html.tmpl", $vars)
+ $template->process($format->{'template'}, $vars)
|| ThrowTemplateError($template->error());
}