Refixing bug 95875 - The code that breakes the typed in CC list into individual lists is now slightly more robust and allows perl to handle the splitting more efficiently (by using a space as the delimiter).

r= myk@mozilla.org
This commit is contained in:
jake%acutex.net 2001-08-18 03:35:36 +00:00
parent 347fef888b
commit ce973b6c4b

View File

@ -582,15 +582,15 @@ if (defined $::FORM{newcc} || defined $::FORM{removecc} || defined $::FORM{massc
} }
if ($cc_add) { if ($cc_add) {
$cc_add =~ s/^[\s,]+//; # Remove leading delimiters. $cc_add =~ s/[\s,]+/ /g; # Change all delimiters to a single space
foreach my $person ( split(/[\s,]+/, $cc_add) ) { foreach my $person ( split(" ", $cc_add) ) {
my $pid = DBNameToIdAndCheck($person); my $pid = DBNameToIdAndCheck($person);
$cc_add{$pid} = $person; $cc_add{$pid} = $person;
} }
} }
if ($cc_remove) { if ($cc_remove) {
$cc_remove =~ s/^[\s,]+//; # Remove leading delimiters. $cc_remove =~ s/[\s,]+/ /g; # Change all delimiters to a single space
foreach my $person ( split(/[\s,]+/, $cc_remove) ) { foreach my $person ( split(" ", $cc_remove) ) {
my $pid = DBNameToIdAndCheck($person); my $pid = DBNameToIdAndCheck($person);
$cc_remove{$pid} = $person; $cc_remove{$pid} = $person;
} }