summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2014-03-27 18:10:55 +0100
committerDavid Lawrence <dkl@mozilla.com>2014-03-27 18:10:55 +0100
commit5ee02011e85d8b0629ffaba4c505def5d411e02f (patch)
treeb04b405af96fe8c744a99f90db88b4465c4b2297 /extensions
parent07ae8250224ecb9b955e525d37d95388631b7e4a (diff)
downloadbugzilla-5ee02011e85d8b0629ffaba4c505def5d411e02f.tar.gz
bugzilla-5ee02011e85d8b0629ffaba4c505def5d411e02f.tar.xz
Bug 988744 - orangefactor template_before_process should check $file before checking user settings
r=glob
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;
}
}