diff --git a/setup/setuputils.class.inc.php b/setup/setuputils.class.inc.php index 049d00e8d..6682eb65f 100644 --- a/setup/setuputils.class.inc.php +++ b/setup/setuputils.class.inc.php @@ -1654,6 +1654,18 @@ JS return array_key_exists('itsm-designer-connector', $aModules); } + /** + * @param array $aModules List of available module codes + * + * @return bool true if the Hub connector is installed + * + * @since 2.7.8 3.0.3 3.1.0 N°5758 method creation + */ + public static function IsConnectableToITopHub($aModules) + { + return array_key_exists('itop-hub-connector', $aModules); + } + /** * @param array $aModules Available modules with code as key and metadata array as values * Same structure as the one returned by {@link \RunTimeEnvironment::AnalyzeInstallation} diff --git a/setup/wizardsteps.class.inc.php b/setup/wizardsteps.class.inc.php index 00ee4dde9..6a43f9dba 100644 --- a/setup/wizardsteps.class.inc.php +++ b/setup/wizardsteps.class.inc.php @@ -680,15 +680,17 @@ class WizStepLicense extends WizardStep } /** - * @return bool + * @return bool true if we need to display a GDPR confirmation * @throws \Exception - * @since 2.7.7 3.0.2 3.1.0 + * @since 2.7.7 3.0.2 3.1.0 N°5037 method creation + * @since 2.7.8 3.0.3 3.1.0 N°5758 rename from NeedsRgpdConsent to NeedsGdprConsent */ - private function NeedsRgpdConsent() + private function NeedsGdprConsent() { $sMode = $this->oWizard->GetParameter('install_mode'); $aModules = SetupUtils::AnalyzeInstallation($this->oWizard); - return $sMode == 'install' && !SetupUtils::IsProductVersion($aModules); + + return (($sMode === 'install') && SetupUtils::IsConnectableToITopHub($aModules)); } /** @@ -724,7 +726,7 @@ CSS $oPage->add(''); $sChecked = ($this->oWizard->GetParameter('accept_license', 'no') == 'yes') ? ' checked ' : ''; $oPage->add('
'); - if ($this->NeedsRgpdConsent()) { + if ($this->NeedsGdprConsent()) { $oPage->add('
'); $oPage->add('
'); $oPage->add('European General Data Protection Regulation');