Retrofit from trunk

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 [from revision 5252]

SVN:2.4[5253]
This commit is contained in:
Eric Espié
2018-01-16 10:41:47 +00:00
parent 8c0bbadbfe
commit 757b3d1cc3

View File

@@ -1491,7 +1491,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;