summaryrefslogtreecommitdiffstats
path: root/userprefs.cgi
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 /userprefs.cgi
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
Diffstat (limited to 'userprefs.cgi')
-rwxr-xr-xuserprefs.cgi49
1 files changed, 22 insertions, 27 deletions
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();