summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/OrangeFactor/Extension.pm15
1 files changed, 7 insertions, 8 deletions
diff --git a/extensions/OrangeFactor/Extension.pm b/extensions/OrangeFactor/Extension.pm
index 483a83533..af629e323 100644
--- a/extensions/OrangeFactor/Extension.pm
+++ b/extensions/OrangeFactor/Extension.pm
@@ -22,17 +22,16 @@ sub template_before_process {
my $user = Bugzilla->user;
- return unless $user && $user->id && $user->settings;
- return unless $user->settings->{'orange_factor'}->{'value'} eq 'on';
+ return unless ($file eq 'bug/show-header.html.tmpl'
+ || $file eq 'bug/edit.html.tmpl');
+ return unless ($user->id
+ && $user->settings->{'orange_factor'}->{'value'} eq 'on');
# in the header we just need to set the var,
# to ensure the css and javascript get included
- if ($file eq 'bug/show-header.html.tmpl'
- || $file eq 'bug/edit.html.tmpl') {
- my $bug = exists $vars->{'bugs'} ? $vars->{'bugs'}[0] : $vars->{'bug'};
- if ($bug && grep($_->name eq 'intermittent-failure', @{ $bug->keyword_objects })) {
- $vars->{'orange_factor'} = 1;
- }
+ my $bug = exists $vars->{'bugs'} ? $vars->{'bugs'}[0] : $vars->{'bug'};
+ if ($bug && grep($_->name eq 'intermittent-failure', @{ $bug->keyword_objects })) {
+ $vars->{'orange_factor'} = 1;
}
}