From f63fb16233e44584f8aba6e6b3386ae6e478f10e Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 8 Nov 2019 14:05:24 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B02135=20-=20Setup=20callbacks=20for=20MTP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- datamodels/2.x/itop-hub-connector/ajax.php | 5 +++-- setup/applicationinstaller.class.inc.php | 5 ----- setup/moduleinstaller.class.inc.php | 10 ---------- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/datamodels/2.x/itop-hub-connector/ajax.php b/datamodels/2.x/itop-hub-connector/ajax.php index af1ad8a8b..f9e44d81e 100644 --- a/datamodels/2.x/itop-hub-connector/ajax.php +++ b/datamodels/2.x/itop-hub-connector/ajax.php @@ -330,7 +330,6 @@ try $oRuntimeEnv->CallInstallerHandlers($aAvailableModules, $aSelectedModules, 'BeforeDatabaseCreation'); - // Now I assume that there is a DB for this environment... $oRuntimeEnv->CreateDatabaseStructure($oConfig, 'upgrade'); $oRuntimeEnv->CallInstallerHandlers($aAvailableModules, $aSelectedModules, 'AfterDatabaseCreation'); @@ -340,7 +339,9 @@ try $oRuntimeEnv->CallInstallerHandlers($aAvailableModules, $aSelectedModules, 'AfterDatabaseSetup'); $oRuntimeEnv->LoadData($aAvailableModules, $aSelectedModules, false /* no sample data*/); - + + $oRuntimeEnv->CallInstallerHandlers($aAvailableModules, $aSelectedModules, 'AfterDataLoad'); + // Record the installation so that the "about box" knows about the installed modules $sDataModelVersion = $oRuntimeEnv->GetCurrentDataModelVersion(); diff --git a/setup/applicationinstaller.class.inc.php b/setup/applicationinstaller.class.inc.php index bfa24ea46..1f11d8bdd 100644 --- a/setup/applicationinstaller.class.inc.php +++ b/setup/applicationinstaller.class.inc.php @@ -1021,11 +1021,6 @@ class ApplicationInstaller // Ready to go !! require_once(APPROOT.'core/dict.class.inc.php'); MetaModel::ResetCache(); - - // Perform final setup tasks here - // - $aAvailableModules = $oProductionEnv->AnalyzeInstallation(MetaModel::GetConfig(), APPROOT.$sModulesDir); - $oProductionEnv->CallInstallerHandlers($aAvailableModules, $aSelectedModuleCodes, 'AfterCreateConfig'); } } diff --git a/setup/moduleinstaller.class.inc.php b/setup/moduleinstaller.class.inc.php index 4f9e9aa1a..e7c5337be 100644 --- a/setup/moduleinstaller.class.inc.php +++ b/setup/moduleinstaller.class.inc.php @@ -74,16 +74,6 @@ abstract class ModuleInstallerAPI { } - /** - * Handler called at the end of the configuration creation - * @param $oConfiguration Config The new configuration of the application - * @param $sPreviousVersion string Previous version number of the module (empty string in case of first install) - * @param $sCurrentVersion string Current version number of the module - */ - public static function AfterCreateConfig(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion) - { - } - /** * Helper to complete the renaming of a class * The renaming is made in the datamodel definition, but the name has to be changed in the DB as well