N°1224 - The 2.4.x setup keep the selected choices from a 1.3.x version.

* The selection is kept even if the extension has a one more module than the 1.3.x

SVN:trunk[5252]
This commit is contained in:
Eric Espié
2018-01-16 10:38:17 +00:00
parent 23f2ea5031
commit bfd092b499

View File

@@ -1497,7 +1497,12 @@ EOF
$aScores[$sChoiceId][$sModuleId] = true;
}
}
if (count($aScores[$sChoiceId]) == count($aChoice['modules']))
// Used for migration from 1.3.x or before
// Accept that the new version can have one new module than the previous version
// The option is still selected
$iSelected = count($aScores[$sChoiceId]);
$iNeeded = count($aChoice['modules']);
if (($iSelected > 0) && (($iNeeded - $iSelected) < 2))
{
// All the modules are installed, this choice is selected
$aDefaults[$sChoiceId] = $sChoiceId;