N°2135 - Setup callbacks for MTP

This commit is contained in:
Eric
2019-11-08 14:05:24 +01:00
parent a4143df36a
commit f63fb16233
3 changed files with 3 additions and 17 deletions

View File

@@ -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();

View File

@@ -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');
}
}

View File

@@ -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