From 63ed06d226773782cb44a34b9e59655fb6d32acb Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Thu, 27 Jul 2023 01:43:33 -0500 Subject: [PATCH] Fix check status for migrations --- public/main/install/index.php | 11 +++++++++-- public/main/install/install.lib.php | 1 - 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/public/main/install/index.php b/public/main/install/index.php index f5b60d7350..74096d398f 100644 --- a/public/main/install/index.php +++ b/public/main/install/index.php @@ -166,7 +166,7 @@ if (!empty($_POST['updatePath'])) { $proposedUpdatePath = $_POST['updatePath']; } -$checkMigrationStatus = checkMigrationStatus(); +$checkMigrationStatus = []; $isUpdateAvailable = isUpdateAvailable(api_get_path(SYS_PATH)); if (isset($_POST['step2_install']) || isset($_POST['step2_update_8']) || isset($_POST['step2_update_6'])) { if (isset($_POST['step2_install'])) { @@ -431,7 +431,14 @@ if (isset($_POST['step2'])) { $stepData['institutionUrlForm'] = $institutionUrlForm; $stepData['encryptPassForm'] = $encryptPassForm; - $isPendingMigration = ($isUpdateAvailable && false === $checkMigrationStatus['status']); + $isPendingMigration = false; + + if ($isUpdateAvailable) { + $checkMigrationStatus = checkMigrationStatus(); + + $isPendingMigration = false === $checkMigrationStatus['status']; + } + if ($isPendingMigration) { $envFile = api_get_path(SYMFONY_SYS_PATH) . '.env.local'; $dotenv = new Dotenv(); diff --git a/public/main/install/install.lib.php b/public/main/install/install.lib.php index 5ecde02cce..44b6a52c45 100644 --- a/public/main/install/install.lib.php +++ b/public/main/install/install.lib.php @@ -1750,7 +1750,6 @@ function isUpdateAvailable(string $baseDir): bool function checkMigrationStatus(): array { - $envFile = api_get_path(SYMFONY_SYS_PATH) . '.env.local'; $dotenv = new Dotenv(); $envFile = api_get_path(SYMFONY_SYS_PATH) . '.env.local'; $dotenv->loadEnv($envFile);