Skip to content
Snippets Groups Projects
Commit db35db12 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Do not allow to migrate n+2 before n+1

parent 4831fb4d
No related branches found
No related tags found
No related merge requests found
...@@ -478,8 +478,17 @@ else ...@@ -478,8 +478,17 @@ else
$choice .= '<td class="listofchoices" align="center">'; $choice .= '<td class="listofchoices" align="center">';
if ($allowupgrade) if ($allowupgrade)
{ {
// If it's not last updagre script, action = upgrade_tmp, if last action = upgrade $disabled=false;
$choice .= '<a class="button runupgrade" href="upgrade.php?action=upgrade'.($count<count($migrationscript)?'_'.$versionto:'').'&amp;selectlang='.$setuplang.'&amp;versionfrom='.$versionfrom.'&amp;versionto='.$versionto.'">'.$langs->trans("Start").'</a>'; if ($foundrecommandedchoice == 2)
{
$disabled=true;
}
if ($foundrecommandedchoice == 1)
{
$foundrecommandedchoice = 2;
}
if ($disabled) $choice .= '<span class="buttonDisable runupgrade"'.($disabled?' disabled="disabled"':'').' href="#">'.$langs->trans("NotAvailable").'</span>';
else $choice .= '<a class="button runupgrade"'.($disabled?' disabled="disabled"':'').' href="upgrade.php?action=upgrade'.($count<count($migrationscript)?'_'.$versionto:'').'&amp;selectlang='.$setuplang.'&amp;versionfrom='.$versionfrom.'&amp;versionto='.$versionto.'">'.$langs->trans("Start").'</a>';
} }
else else
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment