From 7321eeb23faa0f9ad0880a9412e53ca4e63edbed Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Fri, 10 Jul 2026 12:02:12 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B09648=20-=20Better=20dependencies=20error?= =?UTF-8?q?=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/setuputils.class.inc.php | 11 ++++------- setup/unattended-install/unattended-install.php | 3 ++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/setup/setuputils.class.inc.php b/setup/setuputils.class.inc.php index 299b937d48..df9f4b9154 100644 --- a/setup/setuputils.class.inc.php +++ b/setup/setuputils.class.inc.php @@ -553,15 +553,12 @@ class SetupUtils * * @since 3.0.0 N°2214 replace SetupLog::Log calls by CheckResult::TRACE */ - public static function CheckSelectedModules($sSourceDir, $sExtensionDir, $aSelectedModules) + public static function CheckSelectedModules(array $aRelDirsToScan, $aSelectedModules) { $aResult = []; - - $aDirsToScan = [APPROOT.$sSourceDir]; - $sExtensionsPath = APPROOT.$sExtensionDir; - if (is_dir($sExtensionsPath)) { - // if the extensions dir exists, scan it for additional modules as well - $aDirsToScan[] = $sExtensionsPath; + $aDirsToScan = []; + foreach ($aRelDirsToScan as $sRelDir) { + $aDirsToScan[] = APPROOT.$sRelDir; } require_once(APPROOT.'setup/modulediscovery.class.inc.php'); try { diff --git a/setup/unattended-install/unattended-install.php b/setup/unattended-install/unattended-install.php index 3005a41f43..743496bd30 100644 --- a/setup/unattended-install/unattended-install.php +++ b/setup/unattended-install/unattended-install.php @@ -244,7 +244,8 @@ $aChecks = SetupUtils::CheckBackupPrerequisites(APPROOT.'data'); // mmm should b $aSelectedModules = $oParams->Get('selected_modules'); $sSourceDir = $oParams->Get('source_dir', 'datamodels/latest'); $sExtensionDir = $oParams->Get('extensions_dir', 'extensions'); -$aChecks = array_merge($aChecks, SetupUtils::CheckSelectedModules($sSourceDir, $sExtensionDir, $aSelectedModules)); +$aRelDirsToScan = [$sSourceDir, $sExtensionDir, "data/$sTargetEnvironment-modules"]; +$aChecks = array_merge($aChecks, SetupUtils::CheckSelectedModules($aRelDirsToScan, $aSelectedModules)); foreach ($aChecks as $oCheckResult) { switch ($oCheckResult->iSeverity) {