summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Flag.pm
diff options
context:
space:
mode:
authorgerv%gerv.net <>2005-03-30 07:42:53 +0200
committergerv%gerv.net <>2005-03-30 07:42:53 +0200
commit882dcc873146d665f2d1257b89e588ae6e6356f0 (patch)
treeceb5ac9f6378961fbc009216e09447e45b8886e0 /Bugzilla/Flag.pm
parent13e55e5e4b0338848274ebdf258c8e60d826e7fe (diff)
downloadbugzilla-882dcc873146d665f2d1257b89e588ae6e6356f0.tar.gz
bugzilla-882dcc873146d665f2d1257b89e588ae6e6356f0.tar.xz
Bug 73665 - migrate email preferences to their own table, and rearchitect email internals. Patch by gerv; r=jake, a=justdave.
Diffstat (limited to 'Bugzilla/Flag.pm')
-rw-r--r--Bugzilla/Flag.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm
index 5f6384487..961957278 100644
--- a/Bugzilla/Flag.pm
+++ b/Bugzilla/Flag.pm
@@ -72,6 +72,7 @@ use Bugzilla::Util;
use Bugzilla::Error;
use Bugzilla::Attachment;
use Bugzilla::BugMail;
+use Bugzilla::Constants;
use constant TABLES_ALREADY_LOCKED => 1;
@@ -482,7 +483,7 @@ sub create {
# Send an email notifying the relevant parties about the flag creation.
if (($flag->{'requestee'}
- && $flag->{'requestee'}->email_prefs->{'FlagRequestee'})
+ && $flag->{'requestee'}->wants_mail([EVT_FLAG_REQUESTED]))
|| $flag->{'type'}->{'cc_list'})
{
notify($flag, "request/email.txt.tmpl");
@@ -590,7 +591,7 @@ sub modify {
WHERE id = $flag->{'id'}");
# Send an email notifying the relevant parties about the fulfillment.
- if ($flag->{'setter'}->email_prefs->{'FlagRequester'}
+ if ($flag->{'setter'}->wants_mail([EVT_REQUESTED_FLAG])
|| $flag->{'type'}->{'cc_list'})
{
$flag->{'status'} = $status;
@@ -616,7 +617,7 @@ sub modify {
# Send an email notifying the relevant parties about the request.
if ($flag->{'requestee'}
- && ($flag->{'requestee'}->email_prefs->{'FlagRequestee'}
+ && ($flag->{'requestee'}->wants_mail([EVT_FLAG_REQUESTED])
|| $flag->{'type'}->{'cc_list'}))
{
notify($flag, "request/email.txt.tmpl");