summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extensions/BugModal/Extension.pm14
1 files changed, 11 insertions, 3 deletions
diff --git a/extensions/BugModal/Extension.pm b/extensions/BugModal/Extension.pm
index e929f3fcb..b1356bc34 100644
--- a/extensions/BugModal/Extension.pm
+++ b/extensions/BugModal/Extension.pm
@@ -165,9 +165,17 @@ sub template_before_process {
return;
}
- return unless $file =~ m#^bug/show-([^\.]+)\.html\.tmpl$#;
- my $format = $1;
- return unless _alternative_show_bug_format() eq $format;
+ if ($file =~ m#^bug/show-([^\.]+)\.html\.tmpl$#) {
+ my $format = $1;
+ return unless _alternative_show_bug_format() eq $format;
+ }
+ elsif ($file ne 'bug_modal/edit.html.tmpl') {
+ return;
+ }
+
+ if ($vars->{bug} && !$vars->{bugs}) {
+ $vars->{bugs} = [$vars->{bug}];
+ }
return unless
$vars->{bugs}