From 7f892832fb89f60f3228d22e393fa6c823be12b6 Mon Sep 17 00:00:00 2001 From: "justdave%syndicomm.com" <> Date: Fri, 17 Oct 2003 01:26:09 +0000 Subject: Backing out patch from bug 108528 - failed to take i10n concerns into account --- CGI.pl | 3 +-- process_bug.cgi | 8 ++++---- template/en/default/global/code-error.html.tmpl | 7 +------ 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/CGI.pl b/CGI.pl index 06db6fe55..bcd9a7f90 100644 --- a/CGI.pl +++ b/CGI.pl @@ -111,11 +111,10 @@ sub CheckFormField (\%$;\@) { 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 }); } } diff --git a/process_bug.cgi b/process_bug.cgi index d3155af33..5608c0528 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -842,15 +842,15 @@ if (defined $::FORM{newcc} || defined $::FORM{removecc} || defined $::FORM{massc } 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; } diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl index 458f55c55..73501672b 100644 --- a/template/en/default/global/code-error.html.tmpl +++ b/template/en/default/global/code-error.html.tmpl @@ -208,12 +208,7 @@ 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 %] -- cgit v1.2.3-24-g4f1b