New verb "AfterDatabaseSetup" for performing installation tasks after the completion of the DB creation (+predefined objects & admin account)

SVN:trunk[2820]
This commit is contained in:
Denis Flaven
2013-08-14 07:34:07 +00:00
parent 4fa07536d5
commit 5ed91c2223
2 changed files with 25 additions and 0 deletions

View File

@@ -697,6 +697,21 @@ class ApplicationInstaller
SetupPage::log_info("Administrator account '$sAdminUser' created.");
}
}
// Perform final setup tasks here
//
foreach($aAvailableModules as $sModuleId => $aModule)
{
if (($sModuleId != ROOT_MODULE) && in_array($sModuleId, $aSelectedModules) &&
isset($aAvailableModules[$sModuleId]['installer']) )
{
$sModuleInstallerClass = $aAvailableModules[$sModuleId]['installer'];
SetupPage::log_info("Calling Module Handler: $sModuleInstallerClass::AfterDatabaseSetup(oConfig, {$aModule['version_db']}, {$aModule['version_code']})");
// The validity of the sModuleInstallerClass has been established in BuildConfig()
$aCallSpec = array($sModuleInstallerClass, 'AfterDatabaseSetup');
call_user_func_array($aCallSpec, array(MetaModel::GetConfig(), $aModule['version_db'], $aModule['version_code']));
}
}
}
/**