summaryrefslogtreecommitdiffstats
path: root/userprefs.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-07-26 21:06:23 +0200
committerlpsolit%gmail.com <>2007-07-26 21:06:23 +0200
commita32fefa5719d8f50edee9d2210b0288a3f7c369b (patch)
treeb60aaa77c9a806168108e961d799470572419e3b /userprefs.cgi
parentf8b8880a69966779fb2f458d57f1f99343676117 (diff)
downloadbugzilla-a32fefa5719d8f50edee9d2210b0288a3f7c369b.tar.gz
bugzilla-a32fefa5719d8f50edee9d2210b0288a3f7c369b.tar.xz
Bug 203309: "Users to watch" in email prefs doesn't support wildcard user matching - Patch by Frédéric Buclin <LpSolit@gmail.com> r=timeless a=LpSolit
Diffstat (limited to 'userprefs.cgi')
-rwxr-xr-xuserprefs.cgi9
1 files changed, 7 insertions, 2 deletions
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) {