Commit a32fefa5 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 203309: "Users to watch" in email prefs doesn't support wildcard user…

Bug 203309: "Users to watch" in email prefs doesn't support wildcard user matching - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=timeless a=LpSolit
parent f8b8880a
......@@ -247,7 +247,11 @@ sub SaveEmail {
my $dbh = Bugzilla->dbh;
my $cgi = Bugzilla->cgi;
my $user = Bugzilla->user;
if (Bugzilla->params->{"supportwatchers"}) {
Bugzilla::User::match_field($cgi, { 'new_watchedusers' => {'type' => 'multi'} });
}
###########################################################################
# Role-based preferences
###########################################################################
......@@ -319,7 +323,8 @@ sub SaveEmail {
. " WHERE watcher = ?", undef, $user->id);
# The new information given to us by the user.
my @new_watch_names = split(/[,\s]+/, $cgi->param('new_watchedusers'));
my $new_watched_users = join(',', $cgi->param('new_watchedusers')) || '';
my @new_watch_names = split(/[,\s]+/, $new_watched_users);
my %new_watch_ids;
foreach my $username (@new_watch_names) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment