diff --git a/setup/runtimeenv.class.inc.php b/setup/runtimeenv.class.inc.php index 6cb92b8fd..5ed230a93 100644 --- a/setup/runtimeenv.class.inc.php +++ b/setup/runtimeenv.class.inc.php @@ -194,6 +194,20 @@ class RunTimeEnvironment // Build the list of installed module (get the latest installation) // $aInstallByModule = array(); // array of => array ('installed' => timestamp, '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)) {