summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-12-10 19:26:51 +0100
committerlpsolit%gmail.com <>2008-12-10 19:26:51 +0100
commite087aa6018bab95f403c836d12b30bb5ed39a626 (patch)
tree854a5c41e66b01678bf355c4d9a04232c1136e22
parent65792b68dc19ad0be43473ca0ff6860e06b40421 (diff)
downloadbugzilla-e087aa6018bab95f403c836d12b30bb5ed39a626.tar.gz
bugzilla-e087aa6018bab95f403c836d12b30bb5ed39a626.tar.xz
Bug 399072: Remove the 'supportwatchers' parameter - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
-rw-r--r--Bugzilla/BugMail.pm30
-rw-r--r--Bugzilla/Config/Admin.pm8
-rw-r--r--docs/en/xml/administration.xml33
-rw-r--r--template/en/default/account/prefs/email.html.tmpl4
-rw-r--r--template/en/default/admin/params/admin.html.tmpl6
-rwxr-xr-xuserprefs.cgi49
6 files changed, 43 insertions, 87 deletions
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;
}
diff --git a/docs/en/xml/administration.xml b/docs/en/xml/administration.xml
index 77f02c0f6..df5671502 100644
--- a/docs/en/xml/administration.xml
+++ b/docs/en/xml/administration.xml
@@ -250,34 +250,11 @@
<section id="param-admin-policies">
<title>Administrative Policies</title>
- <para>
- This page contains parameters for basic administrative functions.
- Options include whether to allow the deletion of bugs and users, whether
- to allow users to change their email address, and whether to allow
- user watching (one user receiving all notifications of a selected
- other user).
- </para>
-
- <variablelist>
-
- <varlistentry>
- <term>
- supportwatchers
- </term>
- <listitem>
- <para>
- Turning on this option allows users to ask to receive copies
- of bug mail sent to another user. Watching a user with
- different group permissions is not a way to 'get around' the
- system; copied emails are still subject to the normal groupset
- permissions of a bug, and <quote>watchers</quote> will only be
- copied on emails from bugs they would normally be allowed to view.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
-
+ <para>
+ This page contains parameters for basic administrative functions.
+ Options include whether to allow the deletion of bugs and users,
+ and whether to allow users to change their email address.
+ </para>
</section>
<section id="param-user-authentication">
diff --git a/template/en/default/account/prefs/email.html.tmpl b/template/en/default/account/prefs/email.html.tmpl
index 57c76a93e..a4d22db73 100644
--- a/template/en/default/account/prefs/email.html.tmpl
+++ b/template/en/default/account/prefs/email.html.tmpl
@@ -31,7 +31,6 @@
# below), keyed by reasonname (e.g. comments; again, see
# below). The value is a boolean - true if the user is
# receiving mail for that reason when in that role.
- # Also references the 'supportwatchers' Param.
#%]
[% PROCESS global/variables.none.tmpl %]
@@ -264,7 +263,6 @@ document.write('<input type="button" value="Disable All Mail" onclick="SetCheckb
[% END %]
[% END %]
-[% IF Param('supportwatchers') %]
<hr>
<b>User Watching</b>
@@ -306,8 +304,6 @@ You are currently not watching any users.
[% END %]
</p>
-[% END %]
-
<hr>
<br>
diff --git a/template/en/default/admin/params/admin.html.tmpl b/template/en/default/admin/params/admin.html.tmpl
index 639ea66a1..dd83ebb2e 100644
--- a/template/en/default/admin/params/admin.html.tmpl
+++ b/template/en/default/admin/params/admin.html.tmpl
@@ -37,9 +37,5 @@
"$terms.Bugzilla will issue a warning in case you'd run into inconsistencies " _
"when you're about to do so, but such deletions remain kinda scary. " _
"So, you have to turn on this option before any such deletions " _
- "will ever happen.",
-
- supportwatchers => "Support one user watching (ie getting copies of all related " _
- "email about) another's ${terms.bugs}. Useful for people going on " _
- "vacation, and QA folks watching particular developers' ${terms.bugs}." }
+ "will ever happen." }
%] \ No newline at end of file
diff --git a/userprefs.cgi b/userprefs.cgi
index 4ce0f5715..1bf2d7f5f 100755
--- a/userprefs.cgi
+++ b/userprefs.cgi
@@ -205,29 +205,27 @@ sub DoEmail {
###########################################################################
# User watching
###########################################################################
- if (Bugzilla->params->{"supportwatchers"}) {
- my $watched_ref = $dbh->selectcol_arrayref(
- "SELECT profiles.login_name FROM watch INNER JOIN profiles" .
- " ON watch.watched = profiles.userid" .
- " WHERE watcher = ?" .
- " ORDER BY profiles.login_name",
- undef, $user->id);
- $vars->{'watchedusers'} = $watched_ref;
-
- my $watcher_ids = $dbh->selectcol_arrayref(
- "SELECT watcher FROM watch WHERE watched = ?",
- undef, $user->id);
-
- my @watchers;
- foreach my $watcher_id (@$watcher_ids) {
- my $watcher = new Bugzilla::User($watcher_id);
- push (@watchers, Bugzilla::User::identity($watcher));
- }
-
- @watchers = sort { lc($a) cmp lc($b) } @watchers;
- $vars->{'watchers'} = \@watchers;
+ my $watched_ref = $dbh->selectcol_arrayref(
+ "SELECT profiles.login_name FROM watch INNER JOIN profiles" .
+ " ON watch.watched = profiles.userid" .
+ " WHERE watcher = ?" .
+ " ORDER BY profiles.login_name",
+ undef, $user->id);
+ $vars->{'watchedusers'} = $watched_ref;
+
+ my $watcher_ids = $dbh->selectcol_arrayref(
+ "SELECT watcher FROM watch WHERE watched = ?",
+ undef, $user->id);
+
+ my @watchers;
+ foreach my $watcher_id (@$watcher_ids) {
+ my $watcher = new Bugzilla::User($watcher_id);
+ push(@watchers, Bugzilla::User::identity($watcher));
}
+ @watchers = sort { lc($a) cmp lc($b) } @watchers;
+ $vars->{'watchers'} = \@watchers;
+
###########################################################################
# Role-based preferences
###########################################################################
@@ -249,9 +247,7 @@ sub SaveEmail {
my $cgi = Bugzilla->cgi;
my $user = Bugzilla->user;
- if (Bugzilla->params->{"supportwatchers"}) {
- Bugzilla::User::match_field($cgi, { 'new_watchedusers' => {'type' => 'multi'} });
- }
+ Bugzilla::User::match_field($cgi, { 'new_watchedusers' => {'type' => 'multi'} });
###########################################################################
# Role-based preferences
@@ -308,9 +304,8 @@ sub SaveEmail {
###########################################################################
# User watching
###########################################################################
- if (Bugzilla->params->{"supportwatchers"}
- && (defined $cgi->param('new_watchedusers')
- || defined $cgi->param('remove_watched_users')))
+ if (defined $cgi->param('new_watchedusers')
+ || defined $cgi->param('remove_watched_users'))
{
$dbh->bz_start_transaction();