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;
|
||||
|
||||
if (!isset($page)) {
|
||||
http_response_code(403);
|
||||
die('Direct access to this location is not allowed.');
|
||||
}
|
||||
|
||||
switch ($_SERVER['REQUEST_METHOD']) {
|
||||
case 'POST':
|
||||
$success = false;
|
||||
|
@ -32,6 +27,6 @@ switch ($_SERVER['REQUEST_METHOD']) {
|
|||
echo $th->getMessage();
|
||||
}
|
||||
|
||||
$response['success'] = $success;
|
||||
$response['dbTestSuccess'] = $success;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ $(function() {
|
|||
.then(handleFetchError)
|
||||
.then(handleFetchResponse)
|
||||
.then(function(response) {
|
||||
if (response.success) {
|
||||
if (response.dbTestSuccess) {
|
||||
$('input[type="submit"]').removeClass('disabled');
|
||||
|
||||
form.form('remove errors');
|
||||
|
|
Loading…
Reference in a new issue