diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2013-08-12 17:54:59 +0200 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2013-08-12 17:54:59 +0200 |
commit | c3de43ee18240e8364fae0e9caeeda8cdff8f986 (patch) | |
tree | a479a02c33e75b422afd4395a004c6c2b0644cb0 /request.cgi | |
parent | 261bb90c5cf98eb824f6897cdc0c6c4191618115 (diff) | |
download | bugzilla-c3de43ee18240e8364fae0e9caeeda8cdff8f986.tar.gz bugzilla-c3de43ee18240e8364fae0e9caeeda8cdff8f986.tar.xz |
Bug 894878 - CSV output template for request queues has gone away
r=glob
Diffstat (limited to 'request.cgi')
-rwxr-xr-x | request.cgi | 19 |
1 files changed, 13 insertions, 6 deletions
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()); } ################################################################################ |