#790 Only report as installed the modules from the previous installation, not all previous installations.

SVN:trunk[2914]
This commit is contained in:
Denis Flaven
2013-10-15 15:17:50 +00:00
parent d5be250640
commit 09318b81c0

View File

@@ -194,6 +194,20 @@ class RunTimeEnvironment
// Build the list of installed module (get the latest installation)
//
$aInstallByModule = array(); // array of <module> => array ('installed' => timestamp, 'version' => <version>)
$iRootId = 0;
foreach ($aSelectInstall as $aInstall)
{
if (($aInstall['parent_id'] == 0) && ($aInstall['name'] != 'datamodel'))
{
// Root module, what is its ID ?
$iId = (int) $aInstall['id'];
if ($iId > $iRootId)
{
$iRootId = $iId;
}
}
}
foreach ($aSelectInstall as $aInstall)
{
//$aInstall['comment']; // unsused
@@ -212,6 +226,11 @@ class RunTimeEnvironment
{
$sModuleName = ROOT_MODULE;
}
else if($aInstall['parent_id'] != $iRootId)
{
// Skip all modules belonging to previous installations
continue;
}
if (array_key_exists($sModuleName, $aInstallByModule))
{