From 5442f30623e8c2cc2f384501a63c9bd6833ebe47 Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Sun, 28 Jan 2024 15:27:15 +0100 Subject: [PATCH] precheck enhanced --- install/index.php | 151 ++++++++++++++++++++++++++-------------------- 1 file changed, 86 insertions(+), 65 deletions(-) diff --git a/install/index.php b/install/index.php index 362cab803..6452b0efb 100644 --- a/install/index.php +++ b/install/index.php @@ -9,21 +9,46 @@ ['condition' => isExtensionInstalled('curl')], + 'php-mysql' => ['condition' => isExtensionInstalled('mysqli')], + 'php-mbstring' => ['condition' => isExtensionInstalled('mbstring')], + 'php-xml' => ['condition' => isExtensionInstalled('xml')], + 'php-zip' => ['condition' => isExtensionInstalled('zip')], +]; // MariaDB / MySQL $mariadb_version = 10.1; $mysql_version = 5.7; +// ######################################################### END OF PRECONFIGURATION + + + + + +// Function to check if a PHP extension is installed +function isExtensionInstalled($extensionName) +{ + return in_array($extensionName, get_loaded_extensions()); +} function delDir($dir) { @@ -170,75 +195,45 @@ if ($_POST && isset($_POST['submit'])) {
-
+

PHP Modules

+ - + + - - - - - - - - - - - - - - - - - - - - - - - - + $moduleData) { + $condition = $moduleData['condition']; + $allChecksPassed = $allChecksPassed && $condition; + ?> + + + + + +
Version (min. 7.4)Version - +
php-curl - - Installed - - Not Installed - -
php-mysql - - Installed - - Not Installed - -
php-mbstring - - Installed - - Not Installed - -
php-xml - - Installed - - Not Installed - -
php-zip - - Installed - - Not Installed - -
+ + + +
+

MySQL / MariaDB

@@ -251,7 +246,7 @@ if ($_POST && isset($_POST['submit'])) {
-

You can test your MySQL/MariaDB Version in Step 4

+

You can test your MySQL/MariaDB Version in Step 4

@@ -267,7 +262,8 @@ if ($_POST && isset($_POST['submit'])) { if ($maxExecutionTime >= $max_execution_time) { ?> - + @@ -283,7 +279,8 @@ if ($_POST && isset($_POST['submit'])) { if ($maxUploadFileSizeBytes > ($max_upload_file_size * 1024 * 1024)) { // compare with given value in bytes ?> - + @@ -299,15 +296,26 @@ if ($_POST && isset($_POST['submit'])) { if ($maxUploadFileSizeBytes > ($post_max_size * 1024 * 1024)) { // compare with given value in bytes ?> - +
-
-

Note: Everything is good or not

+
+ + + + +
@@ -461,6 +469,7 @@ if ($_POST && isset($_POST['submit'])) { let firstTabId = 'welcome-tab'; let lastTabId = 'finish-tab'; + let preCheckTabId = 'precheck-tab'; function nextTab() { const activeTab = $('.nav-link.active'); @@ -498,6 +507,18 @@ if ($_POST && isset($_POST['submit'])) { $('#ContinueButton').on('click', nextTab); $('#BackButton').on('click', prevTab); + + + // Check if the active tab is the precheck-tab and disable the ContinueButton if not all Checks passed + $(document).on('shown.bs.tab', function(e) { + const activeTabId = e.target.id; + if (activeTabId === 'precheck-tab') { + $('#ContinueButton').prop('disabled', true); + } else { + $('#ContinueButton').prop('disabled', false); + } + }); + }); // [PWD] button show/hide //