Add curl check file to InstallPreChecks

This commit is contained in:
Jack Anderson 2024-06-25 13:22:32 +01:00 committed by Clemente Raposo
parent 4c7a6754ef
commit f0e2129bdf
2 changed files with 24 additions and 23 deletions

View file

@ -225,26 +225,14 @@ class InstallHandler extends LegacyHandler
$feedback = new Feedback();
$feedback->setSuccess(true);

$checkFile = __DIR__ . '/../../../../.curl_check_main_page';

require_once __DIR__ . "/../../../../core/backend/Install/Service/InstallPreChecks.php";
$installChecks = new InstallPreChecks($log);

try {
file_put_contents($checkFile, 'running');
} catch (Exception $e) {
$feedback->setSuccess(false);
$feedback->setErrors([$e->getMessage()]);
return $feedback;
}
$results[] = $installChecks->checkMainPage($url);
$results[] = $installChecks->checkGraphQlAPI($url);
$modStrings = $installChecks->getLanguageStrings();

if (file_exists($checkFile)) {
unlink($checkFile);
}

$warnings = [];
$errorsFound = false;