Merge pull request #3936 from beganovich/v2-2707-setup-page-fixes

Setup page improvements
This commit is contained in:
David Bomba 2020-07-28 07:46:07 +10:00 committed by GitHub
commit 0c81210bc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 16 deletions

View File

@ -49,17 +49,25 @@ class SystemHealth
if (in_array(false, Arr::dot(self::extensions()))) {
$system_health = false;
}
}
if (phpversion() < self::$php_version) {
$system_health = false;
}
}
if(!self::simpleDbCheck() && $check_database) {
info("db fails");
$system_health = false;
}
if (!self::checkNode()) {
$system_health = false;
}
if (!self::checkNpm()) {
$system_health = false;
}
return [
'system_health' => $system_health,
'extensions' => self::extensions(),
@ -82,14 +90,13 @@ class SystemHealth
exec('node -v', $foo, $exitCode);
if ($exitCode === 0) {
return $foo[0];
return true;
}
return false;
} catch (\Exception $e) {
return false;
return false;
}
}
public static function checkNpm()
@ -98,14 +105,14 @@ class SystemHealth
exec('npm -v', $foo, $exitCode);
if ($exitCode === 0) {
return $foo[0];
}
return true;
}
}catch (\Exception $e) {
return false;
return false;
} catch (\Exception $e) {
return false;
}
}
private static function simpleDbCheck() :bool

View File

@ -3214,7 +3214,7 @@ return [
'password_confirmation' => 'Confirm your password',
'verification' => 'Verification',
'complete_your_bank_account_verification' => 'Before using bank account they must be verified.',
'checkout_com' => 'Checkout.com',
'footer_label' => 'Copyright © :year Invoice Ninja. All rights reserved.',
@ -3224,7 +3224,7 @@ return [
'year_invalid' => 'Provided year is not valid.',
'https_required' => 'HTTPS is required, form will fail',
'if_you_need_help' => 'If you need help you can post to our',
'if_you_need_help' => 'If you need help you can post to our',
'reversed' => 'Reversed',
'update_password_on_confirm' => 'After updating password, your account will be confirmed.',
'bank_account_not_linked' => 'To pay with bank account, first you have to add it as payment method.',
@ -3238,6 +3238,8 @@ return [
'checkout_authorize_label' => 'Checkout.com can be can saved as payment method for future use, once you complete your first transaction. Don\'t forget to check "Save card" during payment process.',
'node_status' => 'Node status',
'npm_status' => 'NPM status',
'node_status_not_found' => 'I could not find Node anywhere. Is it installed?',
'npm_status_not_found' => 'I could not find NPM anywhere. Is it installed?',
'locked_invoice' => 'This invoice is locked and unable to be modified',