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:
Denis Flaven
2012-01-19 16:39:43 +00:00
parent afc6efe91c
commit 68ecf03f19

View File

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