From de177c6bdf5d413b4fdb860970e422fadc943669 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Fri, 16 Aug 2002 05:57:10 +0000 Subject: Bug 162068 - Fix callers of ThrowUserError to use messages.html.tmpl. Patch by gerv; r=bbaetz. --- CGI.pl | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'CGI.pl') diff --git a/CGI.pl b/CGI.pl index d16a94883..ec4ddedfb 100644 --- a/CGI.pl +++ b/CGI.pl @@ -557,12 +557,8 @@ sub CheckEmailSyntax { my ($addr) = (@_); my $match = Param('emailregexp'); if ($addr !~ /$match/ || $addr =~ /[\\\(\)<>&,;:"\[\] \t\r\n]/) { - ThrowUserError("The e-mail address you entered(" . - html_quote($addr) . ") didn't pass our syntax checking - for a legal email address. " . Param('emailregexpdesc') . - ' It must also not contain any of these special characters: - \ ( ) & < > , ; : " [ ], or any whitespace.', - "Check e-mail address syntax"); + $vars->{'addr'} = $addr; + ThrowUserError("illegal_email_address"); } } @@ -616,7 +612,7 @@ sub confirm_login { if ( defined $::FORM{"PleaseMailAPassword"} && !$userid ) { # Ensure the new login is valid if(!ValidateNewUser($enteredlogin)) { - ThrowUserError("That account already exists."); + ThrowUserError("account_exists"); } my $password = InsertNewUser($enteredlogin, ""); @@ -805,10 +801,8 @@ Set-Cookie: Bugzilla_logincookie= ; path=$cookiepath; expires=Sun, 30-Jun-80 00: Content-type: text/html "; - ThrowUserError($::disabledreason . "
" . - "If you believe your account should be restored, please " . - "send email to " . Param("maintainer") . " explaining why.", - "Your account has been disabled"); + $vars->{'disabled_reason'} = $::disabledreason; + ThrowUserError("account_disabled"); } if (!defined $nexturl || $nexturl eq "") { @@ -897,7 +891,7 @@ sub ThrowCodeError { # undef as the second parameter and $unlock_tables as the third. # The second parameter will eventually go away. sub ThrowUserError { - ($vars->{'error'}, $vars->{'title'}, my $unlock_tables) = (@_); + ($vars->{'error'}, my $unlock_tables) = (@_); SendSQL("UNLOCK TABLES") if $unlock_tables; -- cgit v1.2.3-24-g4f1b