From c3de43ee18240e8364fae0e9caeeda8cdff8f986 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Mon, 12 Aug 2013 11:54:59 -0400 Subject: Bug 894878 - CSV output template for request queues has gone away r=glob --- request.cgi | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'request.cgi') diff --git a/request.cgi b/request.cgi index 5ac95f240..1bab9ff45 100755 --- a/request.cgi +++ b/request.cgi @@ -46,8 +46,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'}); ################################################################################ # Main Body Execution @@ -66,7 +70,7 @@ unless (defined $cgi->param('requestee') Bugzilla::User::match_field($fields); if ($action eq 'queue') { - queue(); + queue($format); } else { my $flagtypes = get_flag_types(); @@ -84,8 +88,8 @@ else { } $vars->{'components'} = [ sort { $a cmp $b } keys %components ]; - $template->process('request/queue.html.tmpl', $vars) - || ThrowTemplateError($template->error()); + $template->process($format->{'template'}, $vars) + || ThrowTemplateError($template->error()); } exit; @@ -94,6 +98,7 @@ exit; ################################################################################ sub queue { + my $format = shift; my $cgi = Bugzilla->cgi; my $dbh = Bugzilla->dbh; my $template = Bugzilla->template; @@ -327,9 +332,11 @@ 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) - || ThrowTemplateError($template->error()); + $template->process($format->{'template'}, $vars) + || ThrowTemplateError($template->error()); } ################################################################################ -- cgit v1.2.3-24-g4f1b