mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
#790 Only report as installed the modules from the previous installation, not all previous installations.
SVN:trunk[2914]
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user