diff options
Diffstat (limited to 'show_bug.cgi')
-rwxr-xr-x | show_bug.cgi | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/show_bug.cgi b/show_bug.cgi index 14e259e48..332d5fcbd 100755 --- a/show_bug.cgi +++ b/show_bug.cgi @@ -37,9 +37,11 @@ my $vars = {}; my $user = Bugzilla->login(); +my $format = $template->get_format("bug/show", scalar $cgi->param('format'), + scalar $cgi->param('ctype')); + # Editable, 'single' HTML bugs are treated slightly specially in a few places -my $single = !$cgi->param('format') - && (!$cgi->param('ctype') || $cgi->param('ctype') eq 'html'); +my $single = !$format->{format} && $format->{extension} eq 'html'; # If we don't have an ID, _AND_ we're only doing a single bug, then prompt if (!$cgi->param('id') && $single) { @@ -49,9 +51,6 @@ if (!$cgi->param('id') && $single) { exit; } -my $format = $template->get_format("bug/show", scalar $cgi->param('format'), - scalar $cgi->param('ctype')); - my @bugs; my %marks; @@ -127,5 +126,5 @@ $vars->{'displayfields'} = \%displayfields; print $cgi->header($format->{'ctype'}); -$template->process("$format->{'template'}", $vars) +$template->process($format->{'template'}, $vars) || ThrowTemplateError($template->error()); |