From c558f9f5ab886ca1202ba7095803319361e06290 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Thu, 20 May 2010 17:38:16 +0200 Subject: Bug 565879: Merge ThrowCodeError("action_unrecognized"), ThrowUserError("no_valid_action") and ThrowCodeError("unknown_action") r=ghendricks a=LpSolit --- token.cgi | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'token.cgi') diff --git a/token.cgi b/token.cgi index d4298cde7..560930385 100755 --- a/token.cgi +++ b/token.cgi @@ -56,7 +56,7 @@ Bugzilla->login(LOGIN_OPTIONAL); # Throw an error if the form does not contain an "action" field specifying # what the user wants to do. -$action || ThrowCodeError("unknown_action"); +$action || ThrowUserError('unknown_action'); # If a token was submitted, make sure it is a valid token that exists in the # database and is the correct type for the action being taken. @@ -163,10 +163,7 @@ if ($action eq 'reqpw') { } elsif ($action eq 'cancel_new_account') { cancel_create_account($token); } else { - # If the action that the user wants to take (specified in the "a" form field) - # is none of the above listed actions, display an error telling the user - # that we do not understand what they would like to do. - ThrowCodeError("unknown_action", { action => $action }); + ThrowUserError('unknown_action', {action => $action}); } exit; -- cgit v1.2.3-24-g4f1b