mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 09:38:48 +02:00
Properly initialize source_dir (and target_dir) to avoid scanning the complete subdirectory, which causes a duplicate load of the modules files in case of an upgrade and thus causes the upgrade to fail.
SVN:trunk[1792]
This commit is contained in:
@@ -595,10 +595,10 @@ function WelcomeAndCheckPrerequisites(SetupPage $oP, $aParamValues, $iCurrentSte
|
||||
{
|
||||
$oConfig = new Config($sConfigFile);
|
||||
|
||||
$aVersion = AnalyzeInstallation($oConfig, $aParamValues['source_dir']);
|
||||
$aVersion = AnalyzeInstallation($oConfig, 'datamodel');
|
||||
if (!empty($aVersion[ROOT_MODULE]['version_db']))
|
||||
{
|
||||
$aPreviousParams = array('mode', 'db_server', 'db_user', 'db_pwd','db_name', 'new_db_name', 'db_prefix');
|
||||
$aPreviousParams = array('mode', 'db_server', 'db_user', 'db_pwd','db_name', 'new_db_name', 'db_prefix', 'source_dir', 'target_dir');
|
||||
$sMode = 'upgrade';
|
||||
if ($aVersion[ROOT_MODULE]['version_db'] == $aVersion[ROOT_MODULE]['version_code'])
|
||||
{
|
||||
@@ -614,8 +614,8 @@ function WelcomeAndCheckPrerequisites(SetupPage $oP, $aParamValues, $iCurrentSte
|
||||
AddHiddenParam($oP, 'db_name', $oConfig->GetDBName());
|
||||
AddHiddenParam($oP, 'db_prefix', $oConfig->GetDBSubname());
|
||||
AddHiddenParam($oP, 'mode', $sMode);
|
||||
AddHiddenParam($oP, 'source_dir', 'whichsourcedir');
|
||||
AddHiddenParam($oP, 'target_dir', 'whichtargetdir');
|
||||
AddHiddenParam($oP, 'source_dir', 'datamodel');
|
||||
AddHiddenParam($oP, 'target_dir', 'env-production');
|
||||
if (CheckPHPVersion($oP))
|
||||
{
|
||||
$oP->add("<h2 class=\"next\">Next: Licence agreement</h2>\n");
|
||||
|
||||
Reference in New Issue
Block a user