summaryrefslogtreecommitdiffstats
path: root/Bugzilla/BugMail.pm
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-04-11 09:11:32 +0200
committerByron Jones <bjones@mozilla.com>2013-04-11 09:11:32 +0200
commit861dd56bc901477eec23e060a143e24cc8b79384 (patch)
tree2c45b26f357d47f324ffa8320363a7d38c2927a8 /Bugzilla/BugMail.pm
parentb7dbc39db88b25921af9a0b75c4bf43b8c2538f5 (diff)
downloadbugzilla-861dd56bc901477eec23e060a143e24cc8b79384.tar.gz
bugzilla-861dd56bc901477eec23e060a143e24cc8b79384.tar.xz
Bug 859480: Ability to ignore specific bugs (not get email from them, even as the reporter)
Diffstat (limited to 'Bugzilla/BugMail.pm')
-rw-r--r--Bugzilla/BugMail.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm
index fe611d55d..37421ce3e 100644
--- a/Bugzilla/BugMail.pm
+++ b/Bugzilla/BugMail.pm
@@ -263,6 +263,13 @@ sub Send {
# Deleted users must be excluded.
next unless $user;
+ # If email notifications are disabled for this account, or the bug
+ # is ignored, there is no need to do additional checks.
+ if ($user->email_disabled || $user->is_bug_ignored($id)) {
+ push(@excluded, $user->login);
+ next;
+ }
+
if ($user->can_see_bug($id)) {
# Go through each role the user has and see if they want mail in
# that role.
@@ -279,7 +286,7 @@ sub Send {
}
}
}
-
+
if (scalar(%rels_which_want)) {
# So the user exists, can see the bug, and wants mail in at least
# one role. But do we want to send it to them?
@@ -301,8 +308,6 @@ sub Send {
($user->login eq 'sync-1@bugzilla.tld' || $user->login !~ /\.tld$/))
{
- # OK, OK, if we must. Email the user.
-
# Don't show summaries for bugs the user can't access, and
# provide a hook for extensions such as SecureMail to filter
# this list.