diff options
author | myk%mozilla.org <> | 2002-11-17 21:46:00 +0100 |
---|---|---|
committer | myk%mozilla.org <> | 2002-11-17 21:46:00 +0100 |
commit | d33becc598d23f52d3fbe83854bfe4eecbdd7c18 (patch) | |
tree | 19ecfda696961b89737afa9cdf7be23ce8b84236 /Bugzilla/User.pm | |
parent | 53f98dcc5f905e08dfdb09491aa6283be2000214 (diff) | |
download | bugzilla-d33becc598d23f52d3fbe83854bfe4eecbdd7c18.tar.gz bugzilla-d33becc598d23f52d3fbe83854bfe4eecbdd7c18.tar.xz |
Fix for bug 179494: prevents Bugzilla from thinking users have changed flags when they haven't.
r=bbaetz
a=myk
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r-- | Bugzilla/User.pm | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 7cf05d935..b12b5e135 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -314,8 +314,12 @@ sub match_field { if ((scalar(@{$users}) == 1) && (@{$users}[0]->{'email'} eq $query)) { - $vars->{'form'}->{$field} .= @{$users}[0]->{'email'} . " "; - push @{$vars->{'mform'}->{$field}}, @{$users}[0]->{'email'} . " "; + # delimit with spaces if necessary + if ($vars->{'form'}->{$field}) { + $vars->{'form'}->{$field} .= " "; + } + $vars->{'form'}->{$field} .= @{$users}[0]->{'email'}; + push @{$vars->{'mform'}->{$field}}, @{$users}[0]->{'email'}; next; } @@ -324,10 +328,13 @@ sub match_field { # here is where it checks for multiple matches - if (scalar(@{$users}) == 1) { - # exactly one match - $vars->{'form'}->{$field} .= @{$users}[0]->{'email'} . " "; - push @{$vars->{'mform'}->{$field}}, @{$users}[0]->{'email'} . " "; + if (scalar(@{$users}) == 1) { # exactly one match + # delimit with spaces if necessary + if ($vars->{'form'}->{$field}) { + $vars->{'form'}->{$field} .= " "; + } + $vars->{'form'}->{$field} .= @{$users}[0]->{'email'}; + push @{$vars->{'mform'}->{$field}}, @{$users}[0]->{'email'}; $need_confirm = 1 if &::Param('confirmuniqueusermatch'); } |