diff options
author | lpsolit%gmail.com <> | 2007-07-04 03:31:07 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2007-07-04 03:31:07 +0000 |
commit | e016a0fafabe435ec0b920b3deccfc914a68f95d (patch) | |
tree | cb87ade1408c9c6c108406400a10c9f1437ed39b /whineatnews.pl | |
parent | Bug 385209: Part 2: Only consider */NA and */MANDATORY when the bug is being ... (diff) | |
download | bugzilla-e016a0fafabe435ec0b920b3deccfc914a68f95d.tar.gz bugzilla-e016a0fafabe435ec0b920b3deccfc914a68f95d.tar.bz2 bugzilla-e016a0fafabe435ec0b920b3deccfc914a68f95d.zip |
Bug 337717: whineatnews.pl sends email to users having "Bugmail Disabled = 1" - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=LpSolit
Diffstat (limited to 'whineatnews.pl')
-rwxr-xr-x | whineatnews.pl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/whineatnews.pl b/whineatnews.pl index 42df7be55..c6ab20af5 100755 --- a/whineatnews.pl +++ b/whineatnews.pl @@ -20,6 +20,7 @@ # # Contributor(s): Terry Weissman <terry@mozilla.org> # Joseph Heenan <joseph@heenan.me.uk> +# Frédéric Buclin <LpSolit@gmail.com> # This is a script suitable for running once a day from a cron job. It @@ -33,6 +34,7 @@ use lib '.'; use Bugzilla; use Bugzilla::Mailer; use Bugzilla::Util; +use Bugzilla::User; # Whining is disabled if whinedays is zero exit unless Bugzilla->params->{'whinedays'} >= 1; @@ -68,9 +70,10 @@ foreach my $bug (@$slt_bugs) { foreach my $email (sort (keys %bugs)) { - my $vars = { - 'email' => $email - }; + my $user = new Bugzilla::User({name => $email}); + return if $user->email_disabled; + + my $vars = {'email' => $email}; my @bugs = (); foreach my $i (@{$bugs{$email}}) { |