1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-05 18:52:44 +01:00

Setup page fix form not showing

This commit is contained in:
Benjamin Beganović 2020-07-06 14:27:27 +02:00
parent 6ae3208fa6
commit 9cdecfbfc4
4 changed files with 13 additions and 10 deletions

View File

@ -37,9 +37,9 @@ class SetupController extends Controller
*/
public function index()
{
$check = SystemHealth::check();
$check = SystemHealth::check(false);
if($check['system_health'] == "true" && Schema::hasTable('accounts') && $account = Account::all()->first()) {
if($check['system_health'] == true && $check['simple_db_check'] && Schema::hasTable('accounts') && $account = Account::all()->first()) {
return redirect('/');
}
@ -48,7 +48,7 @@ class SetupController extends Controller
public function doSetup(StoreSetupRequest $request)
{
$check = SystemHealth::check();
$check = SystemHealth::check(false);
if ($check['system_health'] === false) {
info($check);
@ -145,8 +145,6 @@ class SetupController extends Controller
{
$status = SystemHealth::dbCheck($request);
info($status);
if (is_array($status) && $status['success'] === true) {
return response([], 200);
}

View File

@ -43,15 +43,19 @@ class SystemHealth
*
* @return array Result set of checks
*/
public static function check() : array
public static function check($check_database = true) : array
{
$system_health = true;
if (in_array(false, Arr::dot(self::extensions()))) {
$system_health = false;
} elseif (phpversion() < self::$php_version) {
}
if (phpversion() < self::$php_version) {
$system_health = false;
} elseif(!self::simpleDbCheck()) {
}
if(!self::simpleDbCheck() && $check_database) {
info("db fails");
$system_health = false;
}
@ -66,6 +70,7 @@ class SystemHealth
],
'env_writable' => self::checkEnvWritable(),
//'mail' => self::testMailServer(),
'simple_db_check' => (bool) self::simpleDbCheck(),
];
}

File diff suppressed because one or more lines are too long

View File

@ -15,6 +15,6 @@
"/js/clients/quotes/action-selectors.js": "/js/clients/quotes/action-selectors.js?id=b6b33ab51b58b51e1212",
"/js/clients/quotes/approve.js": "/js/clients/quotes/approve.js?id=1c5d76fb5f98bd49f6c8",
"/js/clients/shared/pdf.js": "/js/clients/shared/pdf.js?id=ba1182244cda0e0ffbeb",
"/js/setup/setup.js": "/js/setup/setup.js?id=045266c33610abf0dbd0",
"/js/setup/setup.js": "/js/setup/setup.js?id=c4cd098778bf824a3470",
"/css/card-js.min.css": "/css/card-js.min.css?id=62afeb675235451543ad"
}