From e087aa6018bab95f403c836d12b30bb5ed39a626 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 10 Dec 2008 18:26:51 +0000 Subject: Bug 399072: Remove the 'supportwatchers' parameter - Patch by Frédéric Buclin r/a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/BugMail.pm | 30 ++++++++++++++---------------- Bugzilla/Config/Admin.pm | 8 +------- 2 files changed, 15 insertions(+), 23 deletions(-) (limited to 'Bugzilla') diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm index 4e91d4be4..9a5e1a4c9 100644 --- a/Bugzilla/BugMail.pm +++ b/Bugzilla/BugMail.pm @@ -410,23 +410,21 @@ sub Send { } } - if (Bugzilla->params->{"supportwatchers"}) { - # Find all those user-watching anyone on the current list, who is not - # on it already themselves. - my $involved = join(",", keys %recipients); - - my $userwatchers = - $dbh->selectall_arrayref("SELECT watcher, watched FROM watch - WHERE watched IN ($involved)"); - - # Mark these people as having the role of the person they are watching - foreach my $watch (@$userwatchers) { - while (my ($role, $bits) = each %{$recipients{$watch->[1]}}) { - $recipients{$watch->[0]}->{$role} |= BIT_WATCHING - if $bits & BIT_DIRECT; - } - push (@{$watching{$watch->[0]}}, $watch->[1]); + # Find all those user-watching anyone on the current list, who is not + # on it already themselves. + my $involved = join(",", keys %recipients); + + my $userwatchers = + $dbh->selectall_arrayref("SELECT watcher, watched FROM watch + WHERE watched IN ($involved)"); + + # Mark these people as having the role of the person they are watching + foreach my $watch (@$userwatchers) { + while (my ($role, $bits) = each %{$recipients{$watch->[1]}}) { + $recipients{$watch->[0]}->{$role} |= BIT_WATCHING + if $bits & BIT_DIRECT; } + push(@{$watching{$watch->[0]}}, $watch->[1]); } # Global watcher diff --git a/Bugzilla/Config/Admin.pm b/Bugzilla/Config/Admin.pm index 838e53295..18818e6b5 100644 --- a/Bugzilla/Config/Admin.pm +++ b/Bugzilla/Config/Admin.pm @@ -56,13 +56,7 @@ sub get_param_list { name => 'allowuserdeletion', type => 'b', default => 0 - }, - - { - name => 'supportwatchers', - type => 'b', - default => 0 - } ); + }); return @param_list; } -- cgit v1.2.3-24-g4f1b