sub CheckFormFieldDefined (\%$) {
my ($formRef, # a reference to the form to check (a hash)
$fieldname, # the fieldname to check
- $info, # (optional) error message to give
) = @_;
if (!defined $formRef->{$fieldname}) {
- ThrowCodeError("undefined_field", { field => $fieldname, info => $info });
+ ThrowCodeError("undefined_field", { field => $fieldname });
}
}
}
if ($cc_add) {
- $cc_add =~ s/[\s,]+/ /g; # Change all delimiters to a single space
- foreach my $person ( split(" ", $cc_add) ) {
+ $cc_add =~ s/^[\s,]+//; # Remove leading delimiters.
+ foreach my $person ( split(/[\s,]+/, $cc_add) ) {
my $pid = DBNameToIdAndCheck($person);
$cc_add{$pid} = $person;
}
}
if ($cc_remove) {
- $cc_remove =~ s/[\s,]+/ /g; # Change all delimiters to a single space
- foreach my $person ( split(" ", $cc_remove) ) {
+ $cc_remove =~ s/^[\s,]+//; # Remove leading delimiters.
+ foreach my $person ( split(/[\s,]+/, $cc_remove) ) {
my $pid = DBNameToIdAndCheck($person);
$cc_remove{$pid} = $person;
}
I was unable to retrieve your old password from the database.
[% ELSIF error == "undefined_field" %]
- [% field FILTER html %] was not defined;
- [% IF info %]
- [% info FILTER html %]
- [% ELSE %]
- [% Param('browserbugmessage') %]
- [% END %]
+ [% field FILTER html %] was not defined; [% Param('browserbugmessage') %]
[% ELSIF error == "unknown_action" %]
[% IF action %]