diff --git a/app/Http/Controllers/SetupController.php b/app/Http/Controllers/SetupController.php index 152444ccea76..928647385ee1 100644 --- a/app/Http/Controllers/SetupController.php +++ b/app/Http/Controllers/SetupController.php @@ -35,8 +35,9 @@ class SetupController extends Controller { $check = SystemHealth::check(); - if($check['system_health'] == "true" && Schema::hasTable('accounts') && $account = Account::all()->first()) + if($check['system_health'] == "true" && Schema::hasTable('accounts') && $account = Account::all()->first()) { return redirect('/'); + } $check = SystemHealth::check(); @@ -48,7 +49,7 @@ class SetupController extends Controller $check = SystemHealth::check(); if ($check['system_health'] === false) { - return back(); // This should never be reached. + return response('Oops, something went wrong. Check your logs.'); /** We should never reach this block, but jic. */ } $mail_driver = $request->input('mail_driver'); diff --git a/app/Utils/SystemHealth.php b/app/Utils/SystemHealth.php index d7fddd80df7c..48dfb73d2341 100644 --- a/app/Utils/SystemHealth.php +++ b/app/Utils/SystemHealth.php @@ -45,15 +45,15 @@ class SystemHealth */ public static function check() : array { - $system_health = "true"; + $system_health = true; if (in_array(false, Arr::dot(self::extensions()))) { - $system_health = "false"; + $system_health = false; } elseif (phpversion() < self::$php_version) { - $system_health = "false"; + $system_health = false; } elseif(!self::simpleDbCheck()) { info("db fails"); - $system_health = "false"; + $system_health = false; } return [ diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 0bf6303e63ee..80af9a721abf 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -3224,8 +3224,12 @@ 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 either 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.', + + 'application_settings_label' => 'Let\'s store basic information about your Invoice Ninja!', + 'recommended_in_production' => 'Recommended in production', + 'enable_only_for_development' => 'Enable only for development', ]; diff --git a/resources/views/setup/_application.blade.php b/resources/views/setup/_application.blade.php index 02bdc68dfd80..e9e82520191f 100644 --- a/resources/views/setup/_application.blade.php +++ b/resources/views/setup/_application.blade.php @@ -1,10 +1,10 @@
- Let's store basic information about your Invoice Ninja! + {{ ctrans('texts.application_settings_label') }}