diff options
author | 2013-04-08 16:03:09 -0400 | |
---|---|---|
committer | 2013-04-08 16:03:09 -0400 | |
commit | 72780239f1572950635e058caa4c28068034045f (patch) | |
tree | ee70cdd5d7f93a43d4aa638b6fb2d4b5ab42b003 /Bugzilla/BugMail.pm | |
parent | Bug 857562: ajax_user_autocompletion param ignored on Search by People fields (diff) | |
download | bugzilla-72780239f1572950635e058caa4c28068034045f.tar.gz bugzilla-72780239f1572950635e058caa4c28068034045f.tar.bz2 bugzilla-72780239f1572950635e058caa4c28068034045f.zip |
Bug 148564 - Ability to ignore specific bugs (not get email from them, even as the reporter)
r=glob,r/a=LpSolit
Diffstat (limited to 'Bugzilla/BugMail.pm')
-rw-r--r-- | Bugzilla/BugMail.pm | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 089d3013e..12914ca73 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -212,6 +212,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. @@ -228,7 +235,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? @@ -241,9 +248,8 @@ sub Send { $dep_ok = $user->can_see_bug($params->{blocker}->id) ? 1 : 0; } - # Make sure the user isn't in the nomail list, and the dep check passed. - if ($user->email_enabled && $dep_ok) { - # OK, OK, if we must. Email the user. + # Email the user if the dep check passed. + if ($dep_ok) { $sent_mail = sendMail( { to => $user, bug => $bug, |