summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/User.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 3c18f1908..05b96dd29 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -1461,16 +1461,16 @@ sub wants_mail {
# No mail if there are no events
return 0 if !scalar(@$events);
- # Skip DB query if relationship is explicit
- return 1 if $relationship == REL_GLOBAL_WATCHER;
-
- my $dbh = Bugzilla->dbh;
-
# If a relationship isn't given, default to REL_ANY.
if (!defined($relationship)) {
$relationship = REL_ANY;
}
-
+
+ # Skip DB query if relationship is explicit
+ return 1 if $relationship == REL_GLOBAL_WATCHER;
+
+ my $dbh = Bugzilla->dbh;
+
my $wants_mail =
$dbh->selectrow_array('SELECT 1
FROM email_setting