From a32fefa5719d8f50edee9d2210b0288a3f7c369b Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 26 Jul 2007 19:06:23 +0000 Subject: Bug 203309: "Users to watch" in email prefs doesn't support wildcard user matching - Patch by Frédéric Buclin r=timeless a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- userprefs.cgi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'userprefs.cgi') diff --git a/userprefs.cgi b/userprefs.cgi index 8f2e69f1e..efe07921b 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -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) { -- cgit v1.2.3-24-g4f1b