Commit 33cf6d07 authored by Son Nguyen's avatar Son Nguyen Committed by Gerrit Code Review
Browse files

Merge "Bug 1545374: Form to ignore 'wstoken' value when cancelling"

parents cc39442a 346ccd5a
...@@ -132,8 +132,8 @@ if (!empty($authtype)) { ...@@ -132,8 +132,8 @@ if (!empty($authtype)) {
} }
} }
if ($authtype == 'user') { if ($authtype == 'user') {
$username = param_alphanum('wsusername', ''); $username = param_alphanum('cancel_submit', null) ? '' : param_alphanum('wsusername', '');
$password = param_alphanum('wspassword', ''); $password = param_alphanum('cancel_submit', null) ? '' : param_alphanum('wspassword', '');
$elements['wsusername'] = array('title' => 'wsusername', 'type' => 'text', 'value' => $username); $elements['wsusername'] = array('title' => 'wsusername', 'type' => 'text', 'value' => $username);
$elements['wspassword'] = array('title' => 'wspassword', 'type' => 'text', 'value' => $password); $elements['wspassword'] = array('title' => 'wspassword', 'type' => 'text', 'value' => $password);
if ($username) { if ($username) {
...@@ -144,7 +144,7 @@ if (!empty($authtype)) { ...@@ -144,7 +144,7 @@ if (!empty($authtype)) {
} }
} }
else { else {
$wstoken = param_alphanum('wstoken', ''); $wstoken = param_alphanum('cancel_submit', null) ? '' : param_alphanum('wstoken', '');
$elements['wstoken'] = array('title' => 'wstoken', 'type' => 'text', 'value' => $wstoken); $elements['wstoken'] = array('title' => 'wstoken', 'type' => 'text', 'value' => $wstoken);
if ($wstoken) { if ($wstoken) {
$params[]= 'wstoken=' . $wstoken; $params[]= 'wstoken=' . $wstoken;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment