feat(installer): improve database tester
This commit is contained in:
parent
a4f70b3e05
commit
991b99839a
2 changed files with 2 additions and 7 deletions
|
@ -10,11 +10,6 @@ namespace wishthis;
|
||||||
|
|
||||||
global $page, $database;
|
global $page, $database;
|
||||||
|
|
||||||
if (!isset($page)) {
|
|
||||||
http_response_code(403);
|
|
||||||
die('Direct access to this location is not allowed.');
|
|
||||||
}
|
|
||||||
|
|
||||||
switch ($_SERVER['REQUEST_METHOD']) {
|
switch ($_SERVER['REQUEST_METHOD']) {
|
||||||
case 'POST':
|
case 'POST':
|
||||||
$success = false;
|
$success = false;
|
||||||
|
@ -32,6 +27,6 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
||||||
echo $th->getMessage();
|
echo $th->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
$response['success'] = $success;
|
$response['dbTestSuccess'] = $success;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ $(function() {
|
||||||
.then(handleFetchError)
|
.then(handleFetchError)
|
||||||
.then(handleFetchResponse)
|
.then(handleFetchResponse)
|
||||||
.then(function(response) {
|
.then(function(response) {
|
||||||
if (response.success) {
|
if (response.dbTestSuccess) {
|
||||||
$('input[type="submit"]').removeClass('disabled');
|
$('input[type="submit"]').removeClass('disabled');
|
||||||
|
|
||||||
form.form('remove errors');
|
form.form('remove errors');
|
||||||
|
|
Loading…
Reference in a new issue