]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 203309: "Users to watch" in email prefs doesn't support wildcard user matching...
authorlpsolit%gmail.com <>
Thu, 26 Jul 2007 19:06:23 +0000 (19:06 +0000)
committerlpsolit%gmail.com <>
Thu, 26 Jul 2007 19:06:23 +0000 (19:06 +0000)
userprefs.cgi

index 8f2e69f1e48a1142201d9f377aa869f7d4ac95f2..efe07921bec7f8735458d8295aa8d6b6c9b3b583 100755 (executable)
@@ -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) {