aboutsummaryrefslogtreecommitdiffstats
path: root/token.cgi
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-05-20 17:38:16 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2010-05-20 17:38:16 +0200
commitc558f9f5ab886ca1202ba7095803319361e06290 (patch)
tree4c3072f445b8d5fc3f55b4964b7470e5a8c00151 /token.cgi
parentd6e7e1bd1c206b1b336f867ba6a51ed8c6e2fbb1 (diff)
downloadbugs-c558f9f5ab886ca1202ba7095803319361e06290.tar
bugs-c558f9f5ab886ca1202ba7095803319361e06290.tar.gz
bugs-c558f9f5ab886ca1202ba7095803319361e06290.tar.bz2
bugs-c558f9f5ab886ca1202ba7095803319361e06290.tar.xz
bugs-c558f9f5ab886ca1202ba7095803319361e06290.zip
Bug 565879: Merge ThrowCodeError("action_unrecognized"), ThrowUserError("no_valid_action") and ThrowCodeError("unknown_action")
r=ghendricks a=LpSolit
Diffstat (limited to 'token.cgi')
-rwxr-xr-xtoken.cgi7
1 files changed, 2 insertions, 5 deletions
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;